]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix sip_cfg.notifycid to be set with the defined enum values.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 23 Jan 2012 17:33:34 +0000 (17:33 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 23 Jan 2012 17:33:34 +0000 (17:33 +0000)
The invalid value used when notifycid was enabled was benign.  As far as
the code was concerned -1 and 1 are equivalent.

(closes issue ASTERISK-19232)
Reported by: Eike Kuiper

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@352090 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b4d09dfd8af524e2ecc4d0b52ad4b71f5d09a608..8abcd610194c9211dd5cca9ac6a9e95fbc4c381d 100644 (file)
@@ -28140,7 +28140,7 @@ static int reload_config(enum channelreloadreason reason)
                        if (!strcasecmp(v->value, "ignore-context")) {
                                sip_cfg.notifycid = IGNORE_CONTEXT;
                        } else {
-                               sip_cfg.notifycid = ast_true(v->value);
+                               sip_cfg.notifycid = ast_true(v->value) ? ENABLED : DISABLED;
                        }
                } else if (!strcasecmp(v->name, "alwaysauthreject")) {
                        sip_cfg.alwaysauthreject = ast_true(v->value);