[Freeswitch-trunk] [commit] r6669 - freeswitch/trunk/src/mod/applications/mod_enum
Freeswitch SVN
anthm at freeswitch.org
Tue Dec 11 15:39:56 EST 2007
Author: anthm
Date: Tue Dec 11 15:39:55 2007
New Revision: 6669
Modified:
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
Log:
fix enum
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 11 15:39:55 2007
@@ -55,6 +55,7 @@
unsigned char dn[DNS_MAXDN];
enum dns_type qtyp; /* type of the query */
enum_record_t *results;
+ int errs;
};
typedef struct query enum_query_t;
@@ -203,9 +204,10 @@
static void dnserror(enum_query_t * q, int errnum)
{
-
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "unable to lookup %s record for %s: %s\n",
dns_typename(q->qtyp), dns_dntosp(q->dn), dns_strerror(errnum));
+ q->errs++;
}
@@ -501,7 +503,7 @@
j += i;
- if (j > globals.timeout || query.results) {
+ if (j > globals.timeout || query.results || query.errs) {
break;
}
@@ -509,8 +511,9 @@
tv.tv_usec = 0;
i = select((int) (fd + 1), &fds, 0, 0, &tv);
now = time(NULL);
- if (i > 0)
+ if (i > 0) {
dns_ioevent(nctx, now);
+ }
}
if (!query.results) {
More information about the Freeswitch-trunk
mailing list