[pulseaudio-commits] r2411 - in /branches/coling/airtunes/src/modules/rtp: raop_client.c rtsp_client.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun May 11 10:02:20 PDT 2008
Author: coling
Date: Sun May 11 19:02:19 2008
New Revision: 2411
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2411&root=pulseaudio&view=rev
Log:
Do tidy up on disconnection.
Only clear IO related stuff if this free() was triggered deliberatly (i.e. not by server side disconnect)
Modified:
branches/coling/airtunes/src/modules/rtp/raop_client.c
branches/coling/airtunes/src/modules/rtp/rtsp_client.c
Modified: branches/coling/airtunes/src/modules/rtp/raop_client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/rtp/raop_client.c?rev=2411&root=pulseaudio&r1=2410&r2=2411&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/rtp/raop_client.c (original)
+++ branches/coling/airtunes/src/modules/rtp/raop_client.c Sun May 11 19:02:19 2008
@@ -344,6 +344,7 @@
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 @@
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);
}
Modified: branches/coling/airtunes/src/modules/rtp/rtsp_client.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/rtp/rtsp_client.c?rev=2411&root=pulseaudio&r1=2410&r2=2411&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/rtp/rtsp_client.c (original)
+++ branches/coling/airtunes/src/modules/rtp/rtsp_client.c Sun May 11 19:02:19 2008
@@ -151,6 +151,10 @@
if (c) {
if (c->sc)
pa_socket_client_unref(c->sc);
+ if (c->ioline)
+ pa_ioline_close(c->ioline);
+ else if (c->io)
+ pa_iochannel_free(c->io);
pa_xfree(c->url);
pa_xfree(c->localip);
@@ -227,6 +231,10 @@
pa_assert(c->callback);
if (!s) {
+ /* Keep the ioline/iochannel open as they will be freed automatically */
+ c->ioline = NULL;
+ c->io = NULL;
+ pa_rtsp_client_free(c);
c->callback(c, STATE_DISCONNECTED, NULL, c->userdata);
return;
}
More information about the pulseaudio-commits
mailing list