From d8776907f89de81d11338c36a491f3efb0aa5f3e Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Sun, 5 Aug 2012 14:21:28 +0000 Subject: [PATCH] need to lock the callstream a bit earlier --- daemon/call.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index e562b5885..413868bad 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -627,11 +627,11 @@ destroy: #define DS(x) do { \ + mutex_lock(&cs->lock); \ if (ke->stats.x < sr->kstats.x) \ d = 0; \ else \ d = ke->stats.x - sr->kstats.x; \ - mutex_lock(&cs->lock); \ sr->stats.x += d; \ mutex_unlock(&cs->lock); \ mutex_lock(&m->statspslock); \ @@ -1835,8 +1835,6 @@ static void call_status_iterator(struct call *c, struct control_stream *s) { m = c->callmaster; mutex_lock(&c->lock); - /* TODO: only called for tcp controller, so no linked list of calls? */ - control_stream_printf(s, "session %s %s %s %s %s %i\n", c->callid, (char *) g_hash_table_lookup(c->infohash, "from"),