From: Joshua Colp Date: Thu, 16 Apr 2009 13:42:52 +0000 (+0000) Subject: Fix a bug with the dahdi_setoption callback in chan_dahdi. X-Git-Tag: 11.0.0-beta1~5045 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac48378d28967bec1b152abf9ddbc870b4081abc;p=thirdparty%2Fasterisk.git Fix a bug with the dahdi_setoption callback in chan_dahdi. This function incorrectly reported success even if the option was unsupported. This was exposed by the options to change the underlying channel format. The function now returns a failure if the option is unsupported. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188705 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index d5063b661a..1bcd6676b9 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -5035,6 +5035,8 @@ static int dahdi_setoption(struct ast_channel *chan, int option, void *data, int dahdi_disable_ec(p); } break; + default: + return -1; } errno = 0;