need to lock the callstream a bit earlier

git.mgm/mediaproxy-ng/2.1
Richard Fuchs 14 years ago
parent ab3b8c60f0
commit d8776907f8

@ -627,11 +627,11 @@ destroy:
#define DS(x) do { \ #define DS(x) do { \
mutex_lock(&cs->lock); \
if (ke->stats.x < sr->kstats.x) \ if (ke->stats.x < sr->kstats.x) \
d = 0; \ d = 0; \
else \ else \
d = ke->stats.x - sr->kstats.x; \ d = ke->stats.x - sr->kstats.x; \
mutex_lock(&cs->lock); \
sr->stats.x += d; \ sr->stats.x += d; \
mutex_unlock(&cs->lock); \ mutex_unlock(&cs->lock); \
mutex_lock(&m->statspslock); \ mutex_lock(&m->statspslock); \
@ -1835,8 +1835,6 @@ static void call_status_iterator(struct call *c, struct control_stream *s) {
m = c->callmaster; m = c->callmaster;
mutex_lock(&c->lock); 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", control_stream_printf(s, "session %s %s %s %s %s %i\n",
c->callid, c->callid,
(char *) g_hash_table_lookup(c->infohash, "from"), (char *) g_hash_table_lookup(c->infohash, "from"),

Loading…
Cancel
Save