]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Several chan_zap options were not working on reload because they were arbitrarily
authorJason Parker <jparker@digium.com>
Mon, 9 Jul 2007 20:18:15 +0000 (20:18 +0000)
committerJason Parker <jparker@digium.com>
Mon, 9 Jul 2007 20:18:15 +0000 (20:18 +0000)
 disallowed when reloading some/most PRI options (such as signalling) was disallowed.

Options such as polarityonanswerdelay and answeronpolarityswitch can safely be changed on a reload.
This corrects that behavior.

Issue 9186, patch by tzafrir.

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

channels/chan_zap.c

index 6471cb0fc3061a46685d31e6a07deee088244967..e66e171db9b7c78dfab32e2ad0547104a31ae946 100644 (file)
@@ -10664,6 +10664,14 @@ static int setup_zap(int reload)
                                ast_log(LOG_WARNING, "Invalid AMA flags: %s at line %d\n", v->value, v->lineno);
                        else
                                chan_conf.amaflags = y;
+               } else if (!strcasecmp(v->name, "polarityonanswerdelay")) {
+                       chan_conf.polarityonanswerdelay = atoi(v->value);
+               } else if (!strcasecmp(v->name, "answeronpolarityswitch")) {
+                       chan_conf.answeronpolarityswitch = ast_true(v->value);
+               } else if (!strcasecmp(v->name, "hanguponpolarityswitch")) {
+                       chan_conf.hanguponpolarityswitch = ast_true(v->value);
+               } else if (!strcasecmp(v->name, "sendcalleridafter")) {
+                       chan_conf.sendcalleridafter = atoi(v->value);
                } else if(!reload){ 
                         if (!strcasecmp(v->name, "signalling")) {
                                if (!strcasecmp(v->value, "em")) {
@@ -11042,14 +11050,6 @@ static int setup_zap(int reload)
                                        }
                                }
                                close(ctlfd);
-                       } else if (!strcasecmp(v->name, "polarityonanswerdelay")) {
-                               chan_conf.polarityonanswerdelay = atoi(v->value);
-                       } else if (!strcasecmp(v->name, "answeronpolarityswitch")) {
-                               chan_conf.answeronpolarityswitch = ast_true(v->value);
-                       } else if (!strcasecmp(v->name, "hanguponpolarityswitch")) {
-                               chan_conf.hanguponpolarityswitch = ast_true(v->value);
-                       } else if (!strcasecmp(v->name, "sendcalleridafter")) {
-                               chan_conf.sendcalleridafter = atoi(v->value);
                        } else if (!strcasecmp(v->name, "defaultcic")) {
                                ast_copy_string(defaultcic, v->value, sizeof(defaultcic));
                        } else if (!strcasecmp(v->name, "defaultozz")) {