Reset the whole transcoding session memory on destroy

Again, this shouldn't fix anything, but should make debugging easier.

FS-8312
This commit is contained in:
Moises Silva 2016-03-20 20:12:50 -04:00
parent f3ac24bb66
commit 35259cf36c
1 changed files with 1 additions and 2 deletions

View File

@ -864,14 +864,13 @@ static switch_status_t switch_sangoma_destroy(switch_codec_t *codec)
if (sess->encoder.txrtp) {
sngtc_free_transcoding_session(&sess->encoder.reply);
memset(&sess->encoder, 0, sizeof(sess->encoder));
}
if (sess->decoder.txrtp) {
sngtc_free_transcoding_session(&sess->decoder.reply);
memset(&sess->decoder, 0, sizeof(sess->decoder));
}
switch_core_hash_delete(g_sessions_hash, sess->hashkey);
memset(sess, 0, sizeof(*sess));
switch_mutex_unlock(g_sessions_lock);
return SWITCH_STATUS_SUCCESS;