Merge major BSD mutex and symbol conflict patches (bug #1816) (link patch still pending)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-06-22 17:42:14 +00:00
parent 2f4a0dc3f5
commit 5546e32355
30 changed files with 432 additions and 164 deletions

View File

@@ -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);