aboutsummaryrefslogtreecommitdiff
path: root/net/asterisk10/files/patch-enum.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/asterisk10/files/patch-enum.c')
-rw-r--r--net/asterisk10/files/patch-enum.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/net/asterisk10/files/patch-enum.c b/net/asterisk10/files/patch-enum.c
deleted file mode 100644
index fd5c7f9926af..000000000000
--- a/net/asterisk10/files/patch-enum.c
+++ /dev/null
@@ -1,40 +0,0 @@
-
-$FreeBSD$
-
---- enum.c.orig Mon Sep 1 18:36:52 2003
-+++ enum.c Fri Oct 17 11:27:30 2003
-@@ -380,9 +380,14 @@
- struct enum_search *s = NULL;
- int version = -1;
- struct __res_state enumstate;
-- res_ninit(&enumstate);
-- if (chan && ast_autoservice_start(chan) < 0)
-+ static ast_mutex_t reslock = AST_MUTEX_INITIALIZER;
-+
-+ ast_mutex_lock(&reslock);
-+ res_init();
-+ if (chan && ast_autoservice_start(chan) < 0) {
-+ ast_mutex_unlock(&reslock);
- return -1;
-+ }
-
- strncat(naptrinput, number, sizeof(naptrinput) - 2);
-
-@@ -411,7 +416,7 @@
- ast_mutex_unlock(&enumlock);
- if (!s)
- break;
-- res = res_nsearch(&enumstate, tmp, C_IN, T_NAPTR, answer, sizeof(answer));
-+ res = res_search(tmp, C_IN, T_NAPTR, answer, sizeof(answer));
- if (res > 0)
- break;
- }
-@@ -429,7 +434,7 @@
- }
- if (chan)
- ret |= ast_autoservice_stop(chan);
-- res_nclose(&enumstate);
-+ ast_mutex_unlock(&reslock);
- return ret;
- }
-