Merge pull request #448 in FS/freeswitch from bugfix/FS-7911-master to master

* commit 'f2514644e1b9964bc4a2f91b8cbe6f8aedf1214b':
  FS-7911: [mod_conference] do not allocate for conference cdr if conference cdr is disabled, and fix leak in conference_record
This commit is contained in:
Mike Jerris 2015-09-01 13:06:12 -05:00
commit 58fc6abb17
1 changed files with 6 additions and 0 deletions

View File

@ -488,6 +488,8 @@ cJSON *conference_cdr_json_render(conference_obj_t *conference, cJSON *req)
void conference_cdr_del(conference_member_t *member)
{
if (!member->cdr_node) return;
if (member->channel) {
switch_channel_get_variables(member->channel, &member->cdr_node->var_event);
}
@ -504,6 +506,8 @@ void conference_cdr_add(conference_member_t *member)
switch_caller_profile_t *cp;
switch_channel_t *channel;
if (zstr(member->conference->log_dir) && (member->conference->cdr_event_mode == CDRE_NONE)) return;
np = switch_core_alloc(member->conference->pool, sizeof(*np));
np->next = member->conference->cdr_nodes;
@ -535,6 +539,8 @@ void conference_cdr_rejected(conference_obj_t *conference, switch_channel_t *cha
conference_cdr_reject_t *rp;
switch_caller_profile_t *cp;
if (zstr(conference->log_dir) && (conference->cdr_event_mode == CDRE_NONE)) return;
rp = switch_core_alloc(conference->pool, sizeof(*rp));
rp->next = conference->cdr_rejected;