aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-16 10:58:22 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-16 11:33:27 +0100
commite31031084371e695f6b76cc1869b6e87c5e72737 (patch)
tree1ff78bf540da828d06601758b5ad5811d4c749a1
parent677fd1e5c8dbe7133664bebda2e03179a9e98220 (diff)
mgw: Always disable the writing for the socket notifier, initialize variable
This was spotted while verifying the RSIP code using valgrind.
-rw-r--r--src/mgcp_ss7.c2
-rw-r--r--src/thread.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mgcp_ss7.c b/src/mgcp_ss7.c
index eae771a..47c162b 100644
--- a/src/mgcp_ss7.c
+++ b/src/mgcp_ss7.c
@@ -802,8 +802,8 @@ static struct mgcp_ss7 *mgcp_ss7_init(struct mgcp_config *cfg)
return NULL;
}
-#ifndef NO_UNIPORTE
conf->cmd_queue->no_write = 1;
+#ifndef NO_UNIPORTE
pthread_create(&conf->thread, NULL, start_uniporte, conf);
#endif
diff --git a/src/thread.c b/src/thread.c
index 83aa08f..f1ab80e 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -72,7 +72,7 @@ struct thread_notifier *thread_notifier_alloc()
void thread_safe_add(struct thread_notifier *not, struct llist_head *_new)
{
- char c;
+ char c = 1;
pthread_mutex_lock(&not->guard);
llist_add_tail(_new, not->thread_head);