diff options
author | Maxim Sobolev <sobomax@FreeBSD.org> | 2003-10-17 11:22:52 +0000 |
---|---|---|
committer | Maxim Sobolev <sobomax@FreeBSD.org> | 2003-10-17 11:22:52 +0000 |
commit | f01a970a4ec80d0f3ed1b1bdb091b764dcbde9b2 (patch) | |
tree | 0aca8a0e8a5d8ec07e8780b50ba45ca50b749e1f /net/asterisk12/files/patch-enum.c | |
parent | The port depends on an include file, not on a library. Revert back (diff) |
Add asterisk 0.5.0, an Open Source PBX and telephony toolkit.
Notes
Notes:
svn path=/head/; revision=91503
Diffstat (limited to 'net/asterisk12/files/patch-enum.c')
-rw-r--r-- | net/asterisk12/files/patch-enum.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/net/asterisk12/files/patch-enum.c b/net/asterisk12/files/patch-enum.c new file mode 100644 index 000000000000..fd5c7f9926af --- /dev/null +++ b/net/asterisk12/files/patch-enum.c @@ -0,0 +1,40 @@ + +$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; + } + |