mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
client: Send setup reply once only
If find_media() failed in handle_setup_request() two replies was sent. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708819
This commit is contained in:
parent
986bd13463
commit
74b8da9396
1 changed files with 12 additions and 1 deletions
|
@ -564,11 +564,13 @@ no_factory_access:
|
|||
{
|
||||
GST_ERROR ("client %p: not authorized to see factory path %s", client,
|
||||
path);
|
||||
/* error reply is already sent */
|
||||
return NULL;
|
||||
}
|
||||
not_authorized:
|
||||
{
|
||||
GST_ERROR ("client %p: not authorized for factory path %s", client, path);
|
||||
/* error reply is already sent */
|
||||
return NULL;
|
||||
}
|
||||
no_media:
|
||||
|
@ -1420,10 +1422,12 @@ handle_setup_request (GstRTSPClient * client, GstRTSPContext * ctx)
|
|||
} else {
|
||||
if ((media = gst_rtsp_session_media_get_media (sessmedia)))
|
||||
g_object_ref (media);
|
||||
else
|
||||
goto media_not_found;
|
||||
}
|
||||
/* no media, not found then */
|
||||
if (media == NULL)
|
||||
goto media_not_found;
|
||||
goto media_not_found_no_reply;
|
||||
|
||||
if (path[matched] == '\0')
|
||||
goto control_not_found;
|
||||
|
@ -1548,6 +1552,12 @@ no_pool:
|
|||
send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
|
||||
return FALSE;
|
||||
}
|
||||
media_not_found_no_reply:
|
||||
{
|
||||
GST_ERROR ("client %p: media '%s' not found", client, path);
|
||||
/* error reply is already sent */
|
||||
return FALSE;
|
||||
}
|
||||
media_not_found:
|
||||
{
|
||||
GST_ERROR ("client %p: media '%s' not found", client, path);
|
||||
|
@ -1980,6 +1990,7 @@ session_not_found:
|
|||
not_authorized:
|
||||
{
|
||||
GST_ERROR ("client %p: not allowed", client);
|
||||
/* error reply is already sent */
|
||||
goto done;
|
||||
}
|
||||
not_implemented:
|
||||
|
|
Loading…
Reference in a new issue