[pulseaudio-discuss] [PATCH 2/2] rtsp_client: set disconnect state call cb when on_connection fails

Alexander Couzens lynxis at fe80.eu
Tue Feb 4 15:59:14 PST 2014


Fix an abort in rtsp_exec() when connection was refused because the
failure wasn't reported back nor the state set.

Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 src/modules/rtp/rtsp_client.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
index 5343b3c..5d5fed7 100644
--- a/src/modules/rtp/rtsp_client.c
+++ b/src/modules/rtp/rtsp_client.c
@@ -294,6 +294,8 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
 
     if (!io) {
         pa_log("Connection failed: %s", pa_cstrerror(errno));
+        c->state = STATE_DISCONNECTED;
+        c->callback(c, c->state, c->response_headers, c->userdata);
         return;
     }
     pa_assert(!c->ioline);
-- 
1.8.5.3



More information about the pulseaudio-discuss mailing list