[Freeswitch-svn] [commit] r6495 - in freeswitch/trunk: conf/autoload_configs src/mod/applications/mod_enum
Freeswitch SVN
anthm at freeswitch.org
Tue Dec 4 12:44:04 EST 2007
Author: anthm
Date: Tue Dec 4 12:44:03 2007
New Revision: 6495
Modified:
freeswitch/trunk/conf/autoload_configs/enum.conf.xml
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
Log:
fix MODAPP-54
Modified: freeswitch/trunk/conf/autoload_configs/enum.conf.xml
==============================================================================
--- freeswitch/trunk/conf/autoload_configs/enum.conf.xml (original)
+++ freeswitch/trunk/conf/autoload_configs/enum.conf.xml Tue Dec 4 12:44:03 2007
@@ -2,6 +2,7 @@
<settings>
<param name="default-root" value="e164.org"/>
<param name="default-isn-root" value="freenum.org"/>
+ <param name="query-timeout" value="10"/>
</settings>
<routes>
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c Tue Dec 4 12:44:03 2007
@@ -75,6 +75,7 @@
switch_hash_t *routes;
enum_route_t *route_order;
switch_memory_pool_t *pool;
+ int timeout;
} globals;
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_root, globals.root);
@@ -127,6 +128,8 @@
char *val = (char *) switch_xml_attr_soft(param, "value");
if (!strcasecmp(var, "default-root")) {
set_global_root(val);
+ } else if (!strcasecmp(var, "query-timeout")) {
+ globals.timeout = atoi(val);
} else if (!strcasecmp(var, "default-isn-root")) {
set_global_isn_root(val);
} else if (!strcasecmp(var, "log-level-trace")) {
@@ -486,7 +489,7 @@
FD_ZERO(&fds);
now = 0;
- while ((i = dns_timeouts(nctx, -1, now)) > 0) {
+ while ((i = dns_timeouts(nctx, globals.timeout, now)) > 0) {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4389 4127)
@@ -702,7 +705,7 @@
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
-
+ globals.timeout = 10;
load_config();
/* connect my internal structure to the blank pointer passed to me */
More information about the Freeswitch-svn
mailing list