FS-8720: [core] allow passing in blank/null to session::hangup to mean NORMAL_CLEARING hangup cause instead of segfault

This commit is contained in:
Michael Jerris 2016-01-12 10:56:41 -05:00
parent 32d4e56e1e
commit 3304492b41
1 changed files with 1 additions and 1 deletions

View File

@ -718,7 +718,7 @@ SWITCH_DECLARE(void) CoreSession::hangup(const char *cause)
sanity_check_noreturn;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "CoreSession::hangup\n");
this->begin_allow_threads();
switch_channel_hangup(channel, switch_channel_str2cause(cause));
switch_channel_hangup(channel, zstr(cause) ? SWITCH_CAUSE_NORMAL_CLEARING : switch_channel_str2cause(cause));
this->end_allow_threads();
}