diff options
author | Colin Guthrie <pulse@colin.guthr.ie> | 2008-05-11 14:18:48 +0000 |
---|---|---|
committer | Colin Guthrie <pulse@colin.guthr.ie> | 2008-10-08 20:32:08 +0100 |
commit | 899492c31581f5591cd9437052dda15ad02ec0ac (patch) | |
tree | e74bb2f9a077c6867884629a842184f192addf1a /src/modules/rtp/rtsp_client.c | |
parent | 5eecfa2e3f3abcacc9df2776cba798598e5fb6ee (diff) |
Add a new callback structure to propigate when the RTSP connection dies
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2402 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/rtp/rtsp_client.c')
-rw-r--r-- | src/modules/rtp/rtsp_client.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c index 5665c9f6..22f0f0c1 100644 --- a/src/modules/rtp/rtsp_client.c +++ b/src/modules/rtp/rtsp_client.c @@ -173,6 +173,7 @@ static void headers_read(pa_rtsp_client *c) { pa_assert(c); pa_assert(c->response_headers); + pa_assert(c->callback); /* Deal with a SETUP response */ if (STATE_SETUP == c->state) { @@ -209,8 +210,7 @@ static void headers_read(pa_rtsp_client *c) { } /* Call our callback */ - if (c->callback) - c->callback(c, c->state, c->response_headers, c->userdata); + c->callback(c, c->state, c->response_headers, c->userdata); pa_headerlist_free(c->response_headers); c->response_headers = NULL; @@ -224,12 +224,13 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) { pa_rtsp_client *c = userdata; pa_assert(line); pa_assert(c); + pa_assert(c->callback); if (!s) { - pa_log_warn("Connection closed"); pa_ioline_unref(c->ioline); c->ioline = NULL; pa_rtsp_disconnect(c); + c->callback(c, STATE_DISCONNECTED, NULL, c->userdata); return; } |