[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.17-18-g56b6e18

Colin Guthrie gitmailer-noreply at 0pointer.de
Thu Sep 17 16:22:31 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  7b76ea378460bf3e037dff90742f88f74ee70b11 (commit)

- Log -----------------------------------------------------------------
56b6e18 rtp: Factor out direct io writing and use ioline instead.
94d20a5 raop: Use pa_module_unload_request_by_index as per module-zeroconf-discover
-----------------------------------------------------------------------

Summary of changes:
 src/modules/raop/module-raop-discover.c |    4 ++--
 src/modules/rtp/rtsp_client.c           |   22 ++++++----------------
 2 files changed, 8 insertions(+), 18 deletions(-)

-----------------------------------------------------------------------

commit 94d20a59faacb3c690227602ab5d097ea3999d24
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Wed Sep 16 20:54:51 2009 +0100

    raop: Use pa_module_unload_request_by_index as per module-zeroconf-discover

diff --git a/src/modules/raop/module-raop-discover.c b/src/modules/raop/module-raop-discover.c
index eaeb77f..adba8e4 100644
--- a/src/modules/raop/module-raop-discover.c
+++ b/src/modules/raop/module-raop-discover.c
@@ -265,7 +265,7 @@ static void browser_cb(
         struct tunnel *t2;
 
         if ((t2 = pa_hashmap_get(u->tunnels, t))) {
-            pa_module_unload_by_index(u->core, t2->module_index, TRUE);
+            pa_module_unload_request_by_index(u->core, t2->module_index, TRUE);
             pa_hashmap_remove(u->tunnels, t2);
             tunnel_free(t2);
         }
@@ -386,7 +386,7 @@ void pa__done(pa_module*m) {
         struct tunnel *t;
 
         while ((t = pa_hashmap_steal_first(u->tunnels))) {
-            pa_module_unload_by_index(u->core, t->module_index, TRUE);
+            pa_module_unload_request_by_index(u->core, t->module_index, TRUE);
             tunnel_free(t);
         }
 

commit 56b6e18030b5a467946bd0a5803ec119efccdc8a
Author: Colin Guthrie <cguthrie at mandriva.org>
Date:   Fri Sep 18 00:20:46 2009 +0100

    rtp: Factor out direct io writing and use ioline instead.
    
    This is how things should have worked orinally, but I obviously misunderstood things a bit.
    This seems to prevent the random hangups that were happening previously :)

diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
index 915c107..8857414 100644
--- a/src/modules/rtp/rtsp_client.c
+++ b/src/modules/rtp/rtsp_client.c
@@ -60,7 +60,6 @@ struct pa_rtsp_client {
     uint16_t port;
 
     pa_socket_client *sc;
-    pa_iochannel *io;
     pa_ioline *ioline;
 
     pa_rtsp_cb_t callback;
@@ -111,10 +110,8 @@ void pa_rtsp_client_free(pa_rtsp_client* 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_rtsp_disconnect(c);
 
     pa_xfree(c->hostname);
     pa_xfree(c->url);
@@ -187,7 +184,6 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
     if (!s) {
         /* Keep the ioline/iochannel open as they will be freed automatically */
         c->ioline = NULL;
-        c->io = NULL;
         c->callback(c, STATE_DISCONNECTED, NULL, c->userdata);
         return;
     }
@@ -303,8 +299,7 @@ static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata
         pa_log("Connection failed: %s", pa_cstrerror(errno));
         return;
     }
-    pa_assert(!c->io);
-    c->io = io;
+    pa_assert(!c->ioline);
 
     c->ioline = pa_ioline_new(io);
     pa_ioline_set_callback(c->ioline, line_callback, c);
@@ -360,9 +355,6 @@ void pa_rtsp_disconnect(pa_rtsp_client *c) {
 
     if (c->ioline)
         pa_ioline_close(c->ioline);
-    else if (c->io)
-        pa_iochannel_free(c->io);
-    c->io = NULL;
     c->ioline = NULL;
 }
 
@@ -408,13 +400,11 @@ static int rtsp_exec(pa_rtsp_client* c, const char* cmd,
                         pa_headerlist* headers) {
     pa_strbuf* buf;
     char* hdrs;
-    ssize_t l;
 
     pa_assert(c);
     pa_assert(c->url);
-
-    if (!cmd)
-        return -1;
+    pa_assert(cmd);
+    pa_assert(c->ioline);
 
     pa_log_debug("Sending command: %s", cmd);
 
@@ -453,7 +443,7 @@ static int rtsp_exec(pa_rtsp_client* c, const char* cmd,
     hdrs = pa_strbuf_tostring_free(buf);
     /*pa_log_debug("Submitting request:");
     pa_log_debug(hdrs);*/
-    l = pa_iochannel_write(c->io, hdrs, strlen(hdrs));
+    pa_ioline_puts(c->ioline, hdrs);
     pa_xfree(hdrs);
 
     /* FIXME: this is broken, not necessarily all bytes are written */

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list