}
static void
+send_generic_error_response (GstRTSPClient * client, GstRTSPStatusCode code,
+ GstRTSPContext * ctx)
+{
+ GstRTSPClientClass *klass = GST_RTSP_CLIENT_GET_CLASS (client);
+ GstRTSPStatusCode adjusted_code = code;
+
+ if (klass->adjust_error_code != NULL) {
+ adjusted_code = klass->adjust_error_code (client, ctx, code);
+ if (adjusted_code != code) {
+ GST_DEBUG ("adjusted response error code from %d to %d", code,
+ adjusted_code);
+ }
+ }
+ send_generic_response (client, adjusted_code, ctx);
+}
+
+static void
send_option_not_supported_response (GstRTSPClient * client,
GstRTSPContext * ctx, const gchar * unsupported_options)
{
no_factory:
{
GST_ERROR ("client %p: no factory for path %s", client, path);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
return NULL;
}
no_factory_access:
no_media:
{
GST_ERROR ("client %p: can't create media", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
gst_rtsp_url_free (url);
g_object_unref (factory);
ctx->factory = NULL;
no_thread:
{
GST_ERROR ("client %p: can't create thread", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
gst_rtsp_url_free (url);
g_object_unref (media);
ctx->media = NULL;
no_prepare:
{
GST_ERROR ("client %p: can't prepare media", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
gst_rtsp_url_free (url);
g_object_unref (media);
ctx->media = NULL;
no_session:
{
GST_ERROR ("client %p: no session", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
return FALSE;
}
no_uri:
{
GST_ERROR ("client %p: no uri supplied", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
not_found:
{
GST_ERROR ("client %p: no media for uri", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
g_free (path);
return FALSE;
}
no_aggregate:
{
GST_ERROR ("client %p: no aggregate path %s", client, path);
- send_generic_response (client,
+ send_generic_error_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
g_free (path);
g_object_unref (sessmedia);
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
return FALSE;
}
bad_request:
{
GST_ERROR ("client %p: bad request", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
}
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
return FALSE;
}
bad_request:
{
GST_ERROR ("client %p: bad request", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
}
no_session:
{
GST_ERROR ("client %p: no session", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
return FALSE;
}
no_uri:
{
GST_ERROR ("client %p: no uri supplied", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
not_found:
{
GST_ERROR ("client %p: no media for uri", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
g_free (path);
return FALSE;
}
no_aggregate:
{
GST_ERROR ("client %p: no aggregate path %s", client, path);
- send_generic_response (client,
+ send_generic_error_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
g_object_unref (sessmedia);
g_free (path);
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (sessmedia);
g_object_unref (media);
invalid_state:
{
GST_ERROR ("client %p: not PLAYING or RECORDING", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
- ctx);
+ send_generic_error_response (client,
+ GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (sessmedia);
g_object_unref (media);
not_supported:
{
GST_ERROR ("client %p: pausing not supported", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (sessmedia);
g_object_unref (media);
no_session:
{
GST_ERROR ("client %p: no session", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
return FALSE;
}
no_uri:
{
GST_ERROR ("client %p: no uri supplied", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
not_found:
{
GST_ERROR ("client %p: media not found", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
return FALSE;
}
no_aggregate:
{
GST_ERROR ("client %p: no aggregate path %s", client, path);
- send_generic_response (client,
+ send_generic_error_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
g_object_unref (sessmedia);
g_free (path);
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
invalid_state:
{
GST_ERROR ("client %p: not PLAYING or READY", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
- ctx);
+ send_generic_error_response (client,
+ GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
pipeline_error:
{
GST_ERROR ("client %p: failed to configure the pipeline", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
- ctx);
+ send_generic_error_response (client,
+ GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
unsuspend_failed:
{
GST_ERROR ("client %p: unsuspend failed", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
invalid_mode:
{
GST_ERROR ("client %p: seek failed", client);
- send_generic_response (client, code, ctx);
+ send_generic_error_response (client, code, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
unsupported_mode:
{
GST_ERROR ("client %p: media does not support PLAY", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
get_rates_error:
{
GST_ERROR ("client %p: failed obtaining rate and applied_rate", client);
- send_generic_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR,
+ ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
adjust_play_response_failed:
{
GST_ERROR ("client %p: failed to adjust play response", client);
- send_generic_response (client, code, ctx);
+ send_generic_error_response (client, code, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
rtp_info_error:
{
GST_ERROR ("client %p: failed to add RTP-Info", client);
- send_generic_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_INTERNAL_SERVER_ERROR,
+ ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
g_object_unref (sessmedia);
parse_failed:
{
GST_ERROR_OBJECT (client, "failed to parse blocksize");
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
}
no_uri:
{
GST_ERROR ("client %p: no uri", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
no_transport:
{
GST_ERROR ("client %p: no transport", client);
- send_generic_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT,
+ ctx);
goto cleanup_path;
}
no_pool:
{
GST_ERROR ("client %p: no session pool configured", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
goto cleanup_path;
}
media_not_found_no_reply:
media_not_found:
{
GST_ERROR ("client %p: media '%s' not found", client, path);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
goto cleanup_session;
}
control_not_found:
{
GST_ERROR ("client %p: no control in path '%s'", client, path);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
goto cleanup_session;
{
GST_ERROR ("client %p: stream '%s' not found", client,
GST_STR_NULL (control));
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
goto cleanup_session;
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
goto cleanup_path;
service_unavailable:
{
GST_ERROR ("client %p: can't create session", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
gst_rtsp_media_unlock (media);
g_object_unref (media);
goto cleanup_session;
sessmedia_unavailable:
{
GST_ERROR ("client %p: can't create session media", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
goto cleanup_transport;
}
configure_media_failed_no_reply:
unsupported_transports:
{
GST_ERROR ("client %p: unsupported transports", client);
- send_generic_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT,
+ ctx);
goto cleanup_transport;
}
unsupported_client_transport:
{
GST_ERROR ("client %p: unsupported client transport", client);
- send_generic_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT,
+ ctx);
goto cleanup_transport;
}
unsupported_mode:
GST_RTSP_TRANSPORT_MODE_PLAY),
! !(gst_rtsp_media_get_transport_mode (media) &
GST_RTSP_TRANSPORT_MODE_RECORD), ct->mode_play, ct->mode_record);
- send_generic_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_UNSUPPORTED_TRANSPORT,
+ ctx);
goto cleanup_transport;
}
unsupported_range_unit:
{
GST_ERROR ("Client %p: does not support any range format we support",
client);
- send_generic_response (client, GST_RTSP_STS_NOT_IMPLEMENTED, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_IMPLEMENTED, ctx);
goto cleanup_transport;
}
keymgmt_error:
{
GST_ERROR ("client %p: keymgmt error", client);
- send_generic_response (client, GST_RTSP_STS_KEY_MANAGEMENT_FAILURE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_KEY_MANAGEMENT_FAILURE,
+ ctx);
goto cleanup_transport;
}
{
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
return FALSE;
}
no_uri:
{
GST_ERROR ("client %p: no uri", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
no_mount_points:
{
GST_ERROR ("client %p: no mount points configured", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
return FALSE;
}
no_path:
{
GST_ERROR ("client %p: can't find path for url", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
return FALSE;
}
no_media:
unsupported_mode:
{
GST_ERROR ("client %p: media does not support DESCRIBE", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
g_free (path);
gst_rtsp_media_unlock (media);
g_object_unref (media);
no_sdp:
{
GST_ERROR ("client %p: can't create SDP", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
g_free (path);
gst_rtsp_media_unlock (media);
g_object_unref (media);
no_uri:
{
GST_ERROR ("client %p: no uri", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
no_mount_points:
{
GST_ERROR ("client %p: no mount points configured", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
return FALSE;
}
no_path:
{
GST_ERROR ("client %p: can't find path for url", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
gst_sdp_message_free (sdp);
return FALSE;
}
wrong_content_type:
{
GST_ERROR ("client %p: unknown content type", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
no_message:
{
GST_ERROR ("client %p: can't find SDP message", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
sdp_parse_failed:
{
GST_ERROR ("client %p: failed to parse SDP message", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
gst_sdp_message_free (sdp);
return FALSE;
}
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
gst_sdp_message_free (sdp);
gst_rtsp_media_unlock (media);
g_object_unref (media);
unsupported_mode:
{
GST_ERROR ("client %p: media does not support ANNOUNCE", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
g_free (path);
gst_rtsp_media_unlock (media);
g_object_unref (media);
unhandled_sdp:
{
GST_ERROR ("client %p: can't handle SDP", client);
- send_generic_response (client, GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE,
+ ctx);
g_free (path);
gst_rtsp_media_unlock (media);
g_object_unref (media);
no_session:
{
GST_ERROR ("client %p: no session", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
return FALSE;
}
no_uri:
{
GST_ERROR ("client %p: no uri supplied", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
return FALSE;
}
not_found:
{
GST_ERROR ("client %p: media not found", client);
- send_generic_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_FOUND, ctx);
return FALSE;
}
no_aggregate:
{
GST_ERROR ("client %p: no aggregate path %s", client, path);
- send_generic_response (client,
+ send_generic_error_response (client,
GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED, ctx);
g_free (path);
return FALSE;
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
return FALSE;
}
unsupported_mode:
{
GST_ERROR ("client %p: media does not support RECORD", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_METHOD_NOT_ALLOWED, ctx);
return FALSE;
}
invalid_state:
{
GST_ERROR ("client %p: not PLAYING or READY", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
- ctx);
+ send_generic_error_response (client,
+ GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, ctx);
return FALSE;
}
pipeline_error:
{
GST_ERROR ("client %p: failed to configure the pipeline", client);
- send_generic_response (client, GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE,
- ctx);
+ send_generic_error_response (client,
+ GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE, ctx);
return FALSE;
}
unsuspend_failed:
{
GST_ERROR ("client %p: unsuspend failed", client);
- send_generic_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SERVICE_UNAVAILABLE, ctx);
return FALSE;
}
}
{
GST_ERROR ("client %p: pre signal returned error: %s", client,
gst_rtsp_status_as_text (sig_result));
- send_generic_response (client, sig_result, ctx);
+ send_generic_error_response (client, sig_result, ctx);
gst_rtsp_message_free (ctx->response);
return FALSE;
}
not_supported:
{
GST_ERROR ("client %p: version %d not supported", client, version);
- send_generic_response (client, GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED,
- ctx);
+ send_generic_error_response (client,
+ GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED, ctx);
goto done;
}
invalid_command_for_version:
{
GST_ERROR ("client %p: invalid command for version", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
goto done;
}
bad_request:
{
GST_ERROR ("client %p: bad request", client);
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
goto done;
}
no_pool:
{
GST_ERROR ("client %p: no pool configured", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
goto done;
}
session_not_found:
{
GST_ERROR ("client %p: session not found", client);
- send_generic_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_SESSION_NOT_FOUND, ctx);
goto done;
}
not_authorized:
not_implemented:
{
GST_ERROR ("client %p: method %d not implemented", client, method);
- send_generic_response (client, GST_RTSP_STS_NOT_IMPLEMENTED, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_NOT_IMPLEMENTED, ctx);
goto done;
}
}
goto done;
if (result == GST_RTSP_ENOMEM) {
- send_generic_response (client, GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE,
+ ctx);
goto done;
}
if (result == GST_RTSP_EPARSE) {
- send_generic_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
+ send_generic_error_response (client, GST_RTSP_STS_BAD_REQUEST, ctx);
goto done;
}