From 4829f43a3bc252ec8179c121cb1aed765c7c031a Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 4 Nov 2009 00:31:25 +0000 Subject: [PATCH] doh 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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c index 73c228ae53..276d47855e 100644 --- a/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c +++ b/src/mod/xml_int/mod_xml_curl/mod_xml_curl.c @@ -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")) {