state->sessmedia = media;
+ /* we emit the signal before closing the connection */
+ g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_TEARDOWN_REQUEST],
+ 0, state);
+
/* unlink the all TCP callbacks */
unlink_session_transports (client, session, media);
send_response (client, session, state->response, TRUE);
- /* we emit the signal before closing the connection */
- g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_TEARDOWN_REQUEST],
- 0, state);
-
return TRUE;
/* ERRORS */