]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
doh
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 4 Nov 2009 00:31:25 +0000 (00:31 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 4 Nov 2009 00:31:25 +0000 (00:31 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15339 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/xml_int/mod_xml_curl/mod_xml_curl.c

index 73c228ae5317a5bdb4fe7c18f210c95d3e7fbfe6..276d47855e931df184a6850bb0537c3e03a44da7 100644 (file)
@@ -367,6 +367,7 @@ static switch_status_t do_config(void)
                for (param = switch_xml_child(binding_tag, "param"); param; param = param->next) {
                        char *var = (char *) switch_xml_attr_soft(param, "name");
                        char *val = (char *) switch_xml_attr_soft(param, "value");
+
                        if (!strcasecmp(var, "gateway-url")) {
                                bind_mask = (char *) switch_xml_attr_soft(param, "bindings");
                                if (val) {
@@ -396,7 +397,12 @@ static switch_status_t do_config(void)
                        } else if (!strcasecmp(var, "method")) {
                                method = val;
                        } else if (!strcasecmp(var, "timeout")) {
-                               timeout = timeout;
+                               int tmp = atoi(val);
+                               if (tmp >= 0) {
+                                       timeout = tmp;
+                               } else {
+                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't set a negative timeout!\n");
+                               }
                        } else if (!strcasecmp(var, "enable-cacert-check") && switch_true(val)) {
                                enable_cacert_check = 1;
                        } else if (!strcasecmp(var, "ssl-cert-path")) {