[Freeswitch-svn] [commit] r6590 - freeswitch/trunk/src/mod/applications/mod_enum
Freeswitch SVN
brian at freeswitch.org
Mon Dec 10 11:50:50 EST 2007
Author: brian
Date: Mon Dec 10 11:50:50 2007
New Revision: 6590
Modified:
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
Log:
update
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 Mon Dec 10 11:50:50 2007
@@ -432,7 +432,7 @@
char *name = NULL;
enum_query_t query = { 0 };
enum dns_type l_qtyp = DNS_T_NAPTR;
- int i = 0, abs = 0;
+ int i = 0, abs = 0, j = 0;
dns_socket fd = (dns_socket) - 1;
fd_set fds;
struct timeval tv = { 0 };
@@ -489,7 +489,7 @@
FD_ZERO(&fds);
now = 0;
- while ((i = dns_timeouts(nctx, globals.timeout, now)) > 0) {
+ while ((i = dns_timeouts(nctx, 1, now)) > 0) {
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4389 4127)
@@ -498,6 +498,13 @@
#ifdef _MSC_VER
#pragma warning(pop)
#endif
+
+ j += i;
+
+ if (j > globals.timeout || query.results) {
+ break;
+ }
+
tv.tv_sec = i;
tv.tv_usec = 0;
i = select((int) (fd + 1), &fds, 0, 0, &tv);
More information about the Freeswitch-svn
mailing list