rtsp-server: Fix compilation and compiler warnings

This commit is contained in:
Sebastian Dröge 2012-04-13 15:27:22 +02:00
parent 7df1696713
commit e2f10f5ba5
3 changed files with 9 additions and 11 deletions

View file

@ -189,7 +189,7 @@ default_check_method (GstRTSPAuth * auth, GstRTSPClient * client,
gboolean result = TRUE;
GstRTSPResult res;
if (state->method & auth->methods != 0) {
if ((state->method & auth->methods) != 0) {
gchar *authorization;
result = FALSE;
@ -221,7 +221,7 @@ no_auth:
}
/**
* gst_rtsp_auth_check_method:
* gst_rtsp_auth_check:
* @auth: a #GstRTSPAuth
* @client: the client
* @hint: a hint

View file

@ -70,7 +70,7 @@ void gst_rtsp_auth_set_basic (GstRTSPAuth *auth, const gc
gboolean gst_rtsp_auth_setup_auth (GstRTSPAuth *auth, GstRTSPClient * client,
GQuark hint, GstRTSPClientState *state);
gboolean gst_rtsp_auth_check_method (GstRTSPAuth *auth, GstRTSPClient * client,
gboolean gst_rtsp_auth_check (GstRTSPAuth *auth, GstRTSPClient * client,
GQuark hint, GstRTSPClientState *state);
/* helpers */
gchar * gst_rtsp_auth_make_basic (const gchar * user, const gchar * pass);

View file

@ -429,7 +429,7 @@ do_send_data_list (GstBufferList * blist, guint8 channel,
{
guint len, i;
len = gst_buffer_list_len (blist);
len = gst_buffer_list_length (blist);
for (i = 0; i < len; i++) {
GstBuffer *group = gst_buffer_list_get (blist, i);
@ -1351,7 +1351,7 @@ handle_request (GstRTSPClient * client, GstRTSPMessage * request)
state.session = session;
if (client->auth) {
if (!gst_rtsp_auth_check (client->auth, client, &state))
if (!gst_rtsp_auth_check (client->auth, client, 0, &state))
goto not_authorized;
}
@ -1433,9 +1433,7 @@ handle_data (GstRTSPClient * client, GstRTSPMessage * message)
gst_rtsp_message_steal_body (message, &data, &size);
buffer = gst_buffer_new ();
gst_buffer_take_memory (buffer, -1,
gst_memory_new_wrapped (0, data, size, 0, size, data, g_free));
buffer = gst_buffer_new_wrapped (data, size);
handled = FALSE;
for (walk = client->streams; walk; walk = g_list_next (walk)) {
@ -1849,20 +1847,20 @@ tunnel_complete (GstRTSPWatch * watch, gpointer user_data)
no_tunnelid:
{
GST_INFO ("client %p: no tunnelid provided", client);
return GST_RTSP_STS_SERVICE_UNAVAILABLE;
return GST_RTSP_ERROR;
}
no_tunnel:
{
g_mutex_unlock (tunnels_lock);
GST_INFO ("client %p: tunnel session %s not found", client, tunnelid);
return GST_RTSP_STS_SERVICE_UNAVAILABLE;
return GST_RTSP_ERROR;
}
tunnel_closed:
{
g_mutex_unlock (tunnels_lock);
GST_INFO ("client %p: tunnel session %s was closed", client, tunnelid);
g_object_unref (oclient);
return GST_RTSP_STS_SERVICE_UNAVAILABLE;
return GST_RTSP_ERROR;
}
}