[pulseaudio-commits] r2403 - /branches/coling/airtunes/src/modules/module-raop-sink.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun May 11 07:19:42 PDT 2008


Author: coling
Date: Sun May 11 16:19:41 2008
New Revision: 2403

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2403&root=pulseaudio&view=rev
Log:
Listen to the on_close callback. This still causes asserts in the mainloop, so this is not a complete solution

Modified:
    branches/coling/airtunes/src/modules/module-raop-sink.c

Modified: branches/coling/airtunes/src/modules/module-raop-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/coling/airtunes/src/modules/module-raop-sink.c?rev=2403&root=pulseaudio&r1=2402&r2=2403&view=diff
==============================================================================
--- branches/coling/airtunes/src/modules/module-raop-sink.c (original)
+++ branches/coling/airtunes/src/modules/module-raop-sink.c Sun May 11 16:19:41 2008
@@ -340,6 +340,14 @@
     pa_asyncmsgq_post(u->thread_mq.inq, PA_MSGOBJECT(u->sink), SINK_MESSAGE_PASS_SOCKET, NULL, 0, NULL, NULL);
 }
 
+static void on_close(void*userdata) {
+    struct userdata *u = userdata;
+    pa_assert(u);
+
+    pa_log_debug("Control connection closed.");
+    pa_module_unload_request(u->module);
+}
+
 int pa__init(pa_module*m) {
     struct userdata *u = NULL;
     const char *p;
@@ -420,6 +428,7 @@
     }
 
     pa_raop_client_set_callback(u->raop, on_connection, u);
+    pa_raop_client_set_closed_callback(u->raop, on_close, u);
     pa_sink_set_description(u->sink, t = pa_sprintf_malloc("Airtunes sink '%s'", p));
     pa_xfree(t);
 




More information about the pulseaudio-commits mailing list