rtsp-client: Fix session timeout

When streaming data over TCP then is not the keep-alive
functionality working.

The reason is that the function do_send_data have changed
to boolean but the code is still checking the received result
from send_func with GST_RTSP_OK.

The result is that a successful send_func will always lead to
that do_send_data is returning false and the keep-alive will
not be updated.

https://bugzilla.gnome.org/show_bug.cgi?id=795321
This commit is contained in:
Joakim Johansson 2018-04-17 11:03:11 +02:00 committed by Sebastian Dröge
parent bfc35ae1ae
commit 808b49cbfc

View file

@ -1065,7 +1065,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
{
GstRTSPClientPrivate *priv = client->priv;
GstRTSPMessage message = { 0 };
GstRTSPResult res = GST_RTSP_OK;
gboolean ret = TRUE;
GstMapInfo map_info;
guint8 *data;
guint usize;
@ -1080,7 +1080,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
g_mutex_lock (&priv->send_lock);
if (priv->send_func)
res = priv->send_func (client, &message, FALSE, priv->send_data);
ret = priv->send_func (client, &message, FALSE, priv->send_data);
g_mutex_unlock (&priv->send_lock);
gst_rtsp_message_steal_body (&message, &data, &usize);
@ -1088,7 +1088,7 @@ do_send_data (GstBuffer * buffer, guint8 channel, GstRTSPClient * client)
gst_rtsp_message_unset (&message);
return res == GST_RTSP_OK;
return ret;
}
/**