summaryrefslogtreecommitdiff
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-06-22 17:42:14 +0000
committerMark Spencer <markster@digium.com>2004-06-22 17:42:14 +0000
commit5546e323550422b8a84e7c1d0b69e11623666cb6 (patch)
treea3a0875ae4e73c9d9a1fc67f56ffa1ce73fe5457 /channels/chan_h323.c
parent2f4a0dc3f5743f625976e39c031adbc7002f57d0 (diff)
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
Diffstat (limited to 'channels/chan_h323.c')
-rwxr-xr-xchannels/chan_h323.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index e016b4812..622b71f17 100755
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -55,7 +55,8 @@
#include <fcntl.h>
#include <netdb.h>
#include <sys/signal.h>
-#ifdef __OpenBSD__
+#include <sys/param.h>
+#if defined(BSD)
#include <netinet/in_systm.h>
#ifndef IPTOS_MINCOST
#define IPTOS_MINCOST 0x02
@@ -186,8 +187,10 @@ static void __oh323_destroy(struct oh323_pvt *p)
}
if (!cur) {
ast_log(LOG_WARNING, "%p is not in list?!?! \n", cur);
- } else
+ } else {
+ ast_mutex_destroy(&p->lock);
free(p);
+ }
}
static void oh323_destroy(struct oh323_pvt *p)
@@ -1840,11 +1843,14 @@ static struct ast_rtp_protocol oh323_rtp = {
set_rtp_peer: oh323_set_rtp_peer,
};
-
int load_module()
{
int res;
+ ast_mutex_init(&userl.lock);
+ ast_mutex_init(&peerl.lock);
+ ast_mutex_init(&aliasl.lock);
+
res = reload_config();
if (res) {
@@ -1948,6 +1954,7 @@ int unload_module()
pl = p;
p = p->next;
/* free associated memory */
+ ast_mutex_destroy(&pl->lock);
free(pl);
}
iflist = NULL;