aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-22 17:42:14 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-06-22 17:42:14 +0000
commitae5c80e1deeae11fa0f3478a6efa03e38971897f (patch)
treea3a0875ae4e73c9d9a1fc67f56ffa1ce73fe5457 /channels/chan_h323.c
parent8f813d432c685f0b0c25e98261379b083263cf32 (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_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;