From: Alexander Schrab Date: Mon, 27 May 2013 10:58:07 +0000 (+0200) Subject: rtsp-server: Do not crash on nmapping of server X-Git-Tag: 1.19.3~495^2~1137 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c75e1c6b4741cfe9f3ad4264271ce472f66de7c2;p=platform%2Fupstream%2Fgstreamer.git rtsp-server: Do not crash on nmapping of server * generate error when gst_rtsp_connection_accept fails * do not stop accepting incoming connections because accepting a client fails https://bugzilla.gnome.org/show_bug.cgi?id=701072 --- diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 8496aa0..debfbf9 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -2499,7 +2499,8 @@ gst_rtsp_client_accept (GstRTSPClient * client, GSocket * socket, accept_failed: { gchar *str = gst_rtsp_strresult (res); - + *error = g_error_new (GST_LIBRARY_ERROR, GST_LIBRARY_ERROR_FAILED, + "Could not accept client on server socket %p: %s", socket, str); GST_ERROR ("Could not accept client on server socket %p: %s", socket, str); g_free (str); return FALSE; diff --git a/gst/rtsp-server/rtsp-server.c b/gst/rtsp-server/rtsp-server.c index ccfcf49..0035987 100644 --- a/gst/rtsp-server/rtsp-server.c +++ b/gst/rtsp-server/rtsp-server.c @@ -1214,20 +1214,20 @@ gst_rtsp_server_io_func (GSocket * socket, GIOCondition condition, } else { GST_WARNING_OBJECT (server, "received unknown event %08x", condition); } - return TRUE; + return G_SOURCE_CONTINUE; /* ERRORS */ client_failed: { GST_ERROR_OBJECT (server, "failed to create a client"); - return FALSE; + return G_SOURCE_CONTINUE; } accept_failed: { GST_ERROR_OBJECT (server, "failed to accept client: %s", error->message); g_error_free (error); g_object_unref (client); - return FALSE; + return G_SOURCE_CONTINUE; } }