diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-22 17:42:14 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-22 17:42:14 +0000 |
commit | ae5c80e1deeae11fa0f3478a6efa03e38971897f (patch) | |
tree | a3a0875ae4e73c9d9a1fc67f56ffa1ce73fe5457 /channels/chan_iax2.c | |
parent | 8f813d432c685f0b0c25e98261379b083263cf32 (diff) |
Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3273 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_iax2.c')
-rwxr-xr-x | channels/chan_iax2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index cd70a2fda..ba785ce48 100755 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -507,7 +507,7 @@ static struct iax2_dpcache { struct iax2_dpcache *peer; /* For linking in peers */ } *dpcache; -static ast_mutex_t dpcache_lock; +AST_MUTEX_DEFINE_STATIC(dpcache_lock); static void iax_debug_output(const char *data) { @@ -4434,6 +4434,7 @@ static int timing_read(int *id, int fd, short events, void *cbdata) ast_log(LOG_DEBUG, "Dropping unused iax2 trunk peer '%s:%d'\n", inet_ntoa(drop->addr.sin_addr), ntohs(drop->addr.sin_port)); free(drop->trunkdata); ast_mutex_unlock(&drop->lock); + ast_mutex_destroy(&drop->lock); free(drop); } @@ -6820,6 +6821,10 @@ static int __unload_module(void) int unload_module() { + ast_mutex_destroy(&iaxq.lock); + ast_mutex_destroy(&userl.lock); + ast_mutex_destroy(&peerl.lock); + ast_mutex_destroy(&waresl.lock); return __unload_module(); } @@ -6867,6 +6872,7 @@ int load_module(void) ast_mutex_init(&iaxq.lock); ast_mutex_init(&userl.lock); ast_mutex_init(&peerl.lock); + ast_mutex_init(&waresl.lock); ast_cli_register(&cli_show_users); ast_cli_register(&cli_show_channels); |