]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't disable dial if previously allowed
authorRaymond Chandler <intralanman@gmail.com>
Tue, 2 Oct 2012 15:54:19 +0000 (11:54 -0400)
committerRaymond Chandler <intralanman@gmail.com>
Tue, 2 Oct 2012 15:54:19 +0000 (11:54 -0400)
src/mod/applications/mod_httapi/mod_httapi.c

index 887dae38918c136f3038e4df54e276deb525427a..35427c7b79c7b1b7da79b6f81eb0c1e074a4266f 100644 (file)
@@ -1970,19 +1970,19 @@ static switch_status_t do_config(void)
                                } else if (!strcasecmp(var, "dial")) {
                                        profile->perms.dial.enabled = switch_true(val);
                                } else if (!strcasecmp(var, "dial-set-context")) {
-                                       profile->perms.dial.enabled = switch_true(val);
+                                       if (switch_true(val)) profile->perms.dial.enabled = SWITCH_TRUE;
                                        profile->perms.dial.set_context = switch_true(val);
                                } else if (!strcasecmp(var, "dial-set-dialplan")) {
-                                       profile->perms.dial.enabled = switch_true(val);
+                                       if (switch_true(val)) profile->perms.dial.enabled = SWITCH_TRUE;
                                        profile->perms.dial.set_dp = switch_true(val);
                                } else if (!strcasecmp(var, "dial-set-cid-name")) {
-                                       profile->perms.dial.enabled = switch_true(val);
+                                       if (switch_true(val)) profile->perms.dial.enabled = SWITCH_TRUE;
                                        profile->perms.dial.set_cid_name = switch_true(val);
                                } else if (!strcasecmp(var, "dial-set-cid-number")) {
-                                       profile->perms.dial.enabled = switch_true(val);
+                                       if (switch_true(val)) profile->perms.dial.enabled = SWITCH_TRUE;
                                        profile->perms.dial.set_cid_number = switch_true(val);
                                } else if (!strcasecmp(var, "dial-full-originate")) {
-                                       profile->perms.dial.enabled = switch_true(val);
+                                       if (switch_true(val)) profile->perms.dial.enabled = SWITCH_TRUE;
                                        profile->perms.dial.full_originate = switch_true(val);
                                } else if (!strcasecmp(var, "conference")) {
                                        profile->perms.conference.enabled = switch_true(val);