summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-01-19 14:24:07 +0200
committerSebastian Dröge <sebastian@centricular.com>2017-01-19 14:24:07 +0200
commitac1124efb4e5e1cef2853628ba5cb46cdb30308d (patch)
treee23e27e29f05df75d13b7cd6c06ca480120b5f96
parent9f889c59c2f7bd71c394d9d4f714b60f513c24df (diff)
rtsp-client: Fix handling of keep-alive GET_PARAMETER/SET_PARAMETER
While they logically have 0 bytes length, GstRTSPConnection is appending a '\0' to everything making the size be 1 instead.
-rw-r--r--gst/rtsp-server/rtsp-client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index 6f59c5e..63ac617 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -1250,8 +1250,8 @@ handle_get_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
if (res != GST_RTSP_OK)
goto bad_request;
- if (size == 0) {
- /* no body, keep-alive request */
+ if (size == 1) {
+ /* no body (only '\0'), keep-alive request */
send_generic_response (client, GST_RTSP_STS_OK, ctx);
} else {
/* there is a body, handle the params */
@@ -1302,8 +1302,8 @@ handle_set_param_request (GstRTSPClient * client, GstRTSPContext * ctx)
if (res != GST_RTSP_OK)
goto bad_request;
- if (size == 0) {
- /* no body, keep-alive request */
+ if (size == 1) {
+ /* no body (only '\0'), keep-alive request */
send_generic_response (client, GST_RTSP_STS_OK, ctx);
} else {
/* there is a body, handle the params */