mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
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
This commit is contained in:
parent
e047c9fec1
commit
c75e1c6b47
2 changed files with 5 additions and 4 deletions
|
@ -2499,7 +2499,8 @@ gst_rtsp_client_accept (GstRTSPClient * client, GSocket * socket,
|
||||||
accept_failed:
|
accept_failed:
|
||||||
{
|
{
|
||||||
gchar *str = gst_rtsp_strresult (res);
|
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);
|
GST_ERROR ("Could not accept client on server socket %p: %s", socket, str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -1214,20 +1214,20 @@ gst_rtsp_server_io_func (GSocket * socket, GIOCondition condition,
|
||||||
} else {
|
} else {
|
||||||
GST_WARNING_OBJECT (server, "received unknown event %08x", condition);
|
GST_WARNING_OBJECT (server, "received unknown event %08x", condition);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return G_SOURCE_CONTINUE;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
client_failed:
|
client_failed:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (server, "failed to create a client");
|
GST_ERROR_OBJECT (server, "failed to create a client");
|
||||||
return FALSE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
accept_failed:
|
accept_failed:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (server, "failed to accept client: %s", error->message);
|
GST_ERROR_OBJECT (server, "failed to accept client: %s", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
g_object_unref (client);
|
g_object_unref (client);
|
||||||
return FALSE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue