]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8720: [core] allow passing in blank/null to session::hangup to mean NORMAL_CLEARIN...
authorMichael Jerris <mike@jerris.com>
Tue, 12 Jan 2016 15:56:41 +0000 (10:56 -0500)
committerMichael Jerris <mike@jerris.com>
Tue, 12 Jan 2016 15:57:00 +0000 (10:57 -0500)
src/switch_cpp.cpp

index 0467109926dc34df3905ed1923ed6c023f1ba2c4..25be61d7f45244185418f04ff6a24353db9609b0 100644 (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();
 }