Browse Source

Remove callid hash-entry first, then free calls.

git.mgm/mediaproxy-ng/2.0
Andreas Granig 14 years ago
parent
commit
40b80e49fa
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      daemon/call.c

+ 2
- 4
daemon/call.c View File

@ -1110,6 +1110,8 @@ static void kill_callstream(struct callstream *s) {
static void call_destroy_all_branches(struct call *c) {
struct callmaster *m = c->callmaster;
struct call *next;
g_hash_table_remove(m->callhash, c->callid);
/* rewind to beginning of list */
for(; c->prev; c = c->prev);
@ -1117,10 +1119,6 @@ static void call_destroy_all_branches(struct call *c) {
/* delete full list */
while(c) {
mylog(LOG_INFO, "[%s - %s] Delete call branch", c->callid, VIA2STR(c->viabranch));
if(!c->next) {
/* delete hash entry when on last branch */
g_hash_table_remove(m->callhash, c->callid);
}
next = c->next;
call_destroy(c);
c = next;


Loading…
Cancel
Save