[Pkg-voip-commits] [janus] 222/282: Add missing janus_plugin_session_is_alive checks.

Jonas Smedegaard dr at jones.dk
Wed Dec 20 21:53:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.6-1
in repository janus.

commit 689fb401a912089e328c7eaf17082b8a16fede01
Author: Alessandro Toppi <atoppi at meetecho.com>
Date:   Thu Nov 30 11:15:26 2017 +0100

    Add missing janus_plugin_session_is_alive checks.
---
 ice.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ice.c b/ice.c
index bc27bda..f9806d2 100644
--- a/ice.c
+++ b/ice.c
@@ -1234,9 +1234,9 @@ void janus_ice_webrtc_hangup(janus_ice_handle *handle, const char *reason) {
 	if(plugin != NULL) {
 		JANUS_LOG(LOG_VERB, "[%"SCNu64"] Telling the plugin about the hangup because of a %s (%s)\n",
 			handle->handle_id, reason, plugin->get_name());
-		if(plugin && plugin->hangup_media)
+		if(plugin && plugin->hangup_media && janus_plugin_session_is_alive(handle->app_handle))
 			plugin->hangup_media(handle->app_handle);
-		//janus_ice_notify_hangup(handle, reason);
+		/* user will be notified only after the actual hangup */
 		handle->hangup_reason=reason;
 	}
 	if(handle->queued_packets != NULL)
@@ -1601,7 +1601,7 @@ static gboolean janus_ice_check_failed(gpointer data) {
 		janus_plugin *plugin = (janus_plugin *)handle->app;
 		if(plugin != NULL) {
 			JANUS_LOG(LOG_VERB, "[%"SCNu64"] Telling the plugin about it (%s)\n", handle->handle_id, plugin->get_name());
-			if(plugin && plugin->hangup_media)
+			if(plugin && plugin->hangup_media && janus_plugin_session_is_alive(handle->app_handle))
 				plugin->hangup_media(handle->app_handle);
 		}
 		janus_ice_notify_hangup(handle, "ICE failed");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list