Fix a bug with the dahdi_setoption callback in chan_dahdi.
authorJoshua Colp <jcolp@digium.com>
Thu, 16 Apr 2009 13:42:52 +0000 (13:42 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 16 Apr 2009 13:42:52 +0000 (13:42 +0000)
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

channels/chan_dahdi.c

index d5063b6..1bcd667 100644 (file)
@@ -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;