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:
Alexander Schrab 2013-05-27 12:58:07 +02:00 committed by Sebastian Dröge
parent e047c9fec1
commit c75e1c6b47
2 changed files with 5 additions and 4 deletions

View file

@ -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;

View file

@ -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;
}
}