session = state->session;
+ if (!state->uri)
+ goto no_uri;
+
/* get a handle to the configuration of the media in the session */
media = gst_rtsp_session_get_media (session, state->uri);
if (!media)
send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, state);
return FALSE;
}
+no_uri:
+ {
+ GST_ERROR ("client %p: no uri supplied", client);
+ send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, state);
+ return FALSE;
+ }
not_found:
{
GST_ERROR ("client %p: no media for uri", client);
if (!(session = state->session))
goto no_session;
+ if (!state->uri)
+ goto no_uri;
+
/* get a handle to the configuration of the media in the session */
media = gst_rtsp_session_get_media (session, state->uri);
if (!media)
send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, state);
return FALSE;
}
+no_uri:
+ {
+ GST_ERROR ("client %p: no uri supplied", client);
+ send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, state);
+ return FALSE;
+ }
not_found:
{
GST_ERROR ("client %p: no media for uri", client);
if (!(session = state->session))
goto no_session;
+ if (!state->uri)
+ goto no_uri;
+
/* get a handle to the configuration of the media in the session */
media = gst_rtsp_session_get_media (session, state->uri);
if (!media)
send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, state);
return FALSE;
}
+no_uri:
+ {
+ GST_ERROR ("client %p: no uri supplied", client);
+ send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, state);
+ return FALSE;
+ }
not_found:
{
GST_ERROR ("client %p: media not found", client);
GstRTSPState rtspstate;
GstRTSPClientClass *klass;
+ if (!state->uri)
+ goto no_uri;
+
uri = state->uri;
/* the uri contains the stream number we added in the SDP config, which is
return TRUE;
/* ERRORS */
+no_uri:
+ {
+ GST_ERROR ("client %p: no uri", client);
+ send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, state);
+ return FALSE;
+ }
bad_request:
{
GST_ERROR ("client %p: bad request", client);
klass = GST_RTSP_CLIENT_GET_CLASS (client);
+ if (!state->uri)
+ goto no_uri;
+
/* check what kind of format is accepted, we don't really do anything with it
* and always return SDP for now. */
for (i = 0; i++;) {
return TRUE;
/* ERRORS */
+no_uri:
+ {
+ GST_ERROR ("client %p: no uri", client);
+ send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, state);
+ return FALSE;
+ }
no_media:
{
GST_ERROR ("client %p: no media", client);
state.method = method;
/* we always try to parse the url first */
- if (gst_rtsp_url_parse (uristr, &uri) != GST_RTSP_OK)
+ if (strcmp (uristr, "*") == 0) {
+ /* special case where we have * as uri, keep uri = NULL */
+ } else if (gst_rtsp_url_parse (uristr, &uri) != GST_RTSP_OK)
goto bad_request;
/* get the session if there is any */
}
/* sanitize the uri */
- sanitize_uri (uri);
+ if (uri)
+ sanitize_uri (uri);
state.uri = uri;
state.session = session;