gst-rtsp-server: rtsp-server: Fix compilation and compiler warnings
Sebastian Dröge
slomo at kemper.freedesktop.org
Fri Apr 13 06:27:38 PDT 2012
Module: gst-rtsp-server
Branch: master
Commit: e2f10f5ba586c5c4d1bdf400b3bab55d3a7f742c
URL: http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/commit/?id=e2f10f5ba586c5c4d1bdf400b3bab55d3a7f742c
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Fri Apr 13 15:27:22 2012 +0200
rtsp-server: Fix compilation and compiler warnings
---
gst/rtsp-server/rtsp-auth.c | 4 ++--
gst/rtsp-server/rtsp-auth.h | 2 +-
gst/rtsp-server/rtsp-client.c | 14 ++++++--------
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/gst/rtsp-server/rtsp-auth.c b/gst/rtsp-server/rtsp-auth.c
index e01315c..1165677 100644
--- a/gst/rtsp-server/rtsp-auth.c
+++ b/gst/rtsp-server/rtsp-auth.c
@@ -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
diff --git a/gst/rtsp-server/rtsp-auth.h b/gst/rtsp-server/rtsp-auth.h
index 3aadeff..5f06acb 100644
--- a/gst/rtsp-server/rtsp-auth.h
+++ b/gst/rtsp-server/rtsp-auth.h
@@ -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);
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index f814c51..8c08fd1 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -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;
}
}
More information about the gstreamer-commits
mailing list