Browse Source

it's possible not to have any monologues - segfault fix

changes/54/8854/1
Richard Fuchs 11 years ago
parent
commit
0992a20971
1 changed files with 11 additions and 9 deletions
  1. +11
    -9
      daemon/call.c

+ 11
- 9
daemon/call.c View File

@ -2528,15 +2528,17 @@ void call_destroy(struct call *c) {
m->totalstats.total_managed_sess += 1;
ml = c->monologues->data;
if (ml->term_reason==TIMEOUT) {
m->totalstats.total_timeout_sess++;
} else if (ml->term_reason==SILENT_TIMEOUT) {
m->totalstats.total_silent_timeout_sess++;
} else if (ml->term_reason==REGULAR) {
m->totalstats.total_regular_term_sess++;
} else if (ml->term_reason==FORCED) {
m->totalstats.total_forced_term_sess++;
if (c->monologues) {
ml = c->monologues->data;
if (ml->term_reason==TIMEOUT) {
m->totalstats.total_timeout_sess++;
} else if (ml->term_reason==SILENT_TIMEOUT) {
m->totalstats.total_silent_timeout_sess++;
} else if (ml->term_reason==REGULAR) {
m->totalstats.total_regular_term_sess++;
} else if (ml->term_reason==FORCED) {
m->totalstats.total_forced_term_sess++;
}
}
timeval_multiply(&m->totalstats.total_average_call_dur,&m->totalstats.total_average_call_dur,m->totalstats.total_managed_sess-1);


Loading…
Cancel
Save