diff options
author | Colin Guthrie <pulse@colin.guthr.ie> | 2008-05-11 17:02:19 +0000 |
---|---|---|
committer | Colin Guthrie <pulse@colin.guthr.ie> | 2008-10-08 20:32:08 +0100 |
commit | 3767cdb6d16c5817eb489129585fb353e3ad6afa (patch) | |
tree | 33f208b7ffe1ed5ca2ae83591224469c9b9229d4 /src/modules/rtp/raop_client.c | |
parent | 92166846913ebb5e86f36352e20c9ca4f4bf23ae (diff) |
Do tidy up on disconnection.
Only clear IO related stuff if this free() was triggered deliberatly (i.e. not by server side disconnect)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/coling@2411 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/modules/rtp/raop_client.c')
-rw-r--r-- | src/modules/rtp/raop_client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/rtp/raop_client.c b/src/modules/rtp/raop_client.c index a9b9ab1d..e5a373d0 100644 --- a/src/modules/rtp/raop_client.c +++ b/src/modules/rtp/raop_client.c @@ -344,6 +344,7 @@ static void rtsp_cb(pa_rtsp_client *rtsp, pa_rtsp_state state, pa_headerlist* he case STATE_DISCONNECTED: pa_assert(c->closed_callback); pa_log_debug("RTSP channel closed"); + c->rtsp = NULL; if (c->fd > 0) { pa_close(c->fd); c->fd = -1; @@ -400,7 +401,8 @@ void pa_raop_client_free(pa_raop_client* c) pa_assert(c); pa_xfree(c->buffer); - pa_rtsp_client_free(c->rtsp); + if (c->rtsp) + pa_rtsp_client_free(c->rtsp); pa_xfree(c->host); pa_xfree(c); } |