Revision c63ddb33 dtls.c

View differences:

dtls.c
820 820
		return;
821 821
	}
822 822
	JANUS_LOG(LOG_VERB, "[%"SCNu64"] DTLS alert triggered on stream %"SCNu16" (component %"SCNu16"), closing...\n", handle->handle_id, stream->stream_id, component->component_id);
823
	janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_CLEANING);
824
	if(!janus_flags_is_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ALERT)) {
825
		janus_flags_set(&handle->webrtc_flags, JANUS_ICE_HANDLE_WEBRTC_ALERT);
826
		if(handle->iceloop)
827
			g_main_loop_quit(handle->iceloop);
828
		janus_plugin *plugin = (janus_plugin *)handle->app;
829
		if(plugin != NULL) {
830
			JANUS_LOG(LOG_VERB, "[%"SCNu64"] Telling the plugin about it (%s)\n", handle->handle_id, plugin->get_name());
831
			if(plugin && plugin->hangup_media)
832
				plugin->hangup_media(handle->app_handle);
833
			janus_ice_notify_hangup(handle, "DTLS alert");
834
		}
835
	}
823
	janus_ice_webrtc_hangup(handle, "DTLS alert");
836 824
}
837 825

  
838 826
/* DTLS certificate verification callback */

Also available in: Unified diff