[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.15-test2-5-g6bb3dc8

Lennart Poettering gitmailer-noreply at 0pointer.de
Thu Feb 12 13:52:30 PST 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  87e134277dd54b55a62284844e3f35d9ffd5f49c (commit)

- Log -----------------------------------------------------------------
6bb3dc8... don't try to recycle rtpoll objects
-----------------------------------------------------------------------

Summary of changes:
 src/modules/bluetooth/module-bluetooth-device.c |   18 +++++++++++-------
 src/pulsecore/rtpoll.c                          |    2 +-
 2 files changed, 12 insertions(+), 8 deletions(-)

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

commit 6bb3dc82ba0aa53168c21c9b82cb86cc11563640
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Feb 12 22:52:02 2009 +0100

    don't try to recycle rtpoll objects

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 3498088..6daae83 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1522,6 +1522,13 @@ static void stop_thread(struct userdata *u) {
         pa_source_unref(u->source);
         u->source = NULL;
     }
+
+    pa_thread_mq_done(&u->thread_mq);
+
+    if (u->rtpoll) {
+        pa_rtpoll_free(u->rtpoll);
+        u->rtpoll = NULL;
+    }
 }
 
 static int start_thread(struct userdata *u) {
@@ -1529,6 +1536,7 @@ static int start_thread(struct userdata *u) {
 
     pa_assert(u);
     pa_assert(!u->thread);
+    pa_assert(!u->rtpoll);
     pa_assert(!u->rtpoll_item);
 
     if (USE_SCO_OVER_PCM(u)) {
@@ -1537,6 +1545,9 @@ static int start_thread(struct userdata *u) {
         return 0;
     }
 
+    u->rtpoll = pa_rtpoll_new();
+    pa_thread_mq_init(&u->thread_mq, u->core->mainloop, u->rtpoll);
+
     u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
     pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
     pollfd->fd = u->stream_fd;
@@ -1764,8 +1775,6 @@ int pa__init(pa_module* m) {
     u->service_fd = -1;
     u->stream_fd = -1;
     u->read_smoother = pa_smoother_new(PA_USEC_PER_SEC, PA_USEC_PER_SEC*2, TRUE, 10);
-    u->rtpoll = pa_rtpoll_new();
-    pa_thread_mq_init(&u->thread_mq, u->core->mainloop, u->rtpoll);
     u->sample_spec = m->core->default_sample_spec;
     u->modargs = ma;
 
@@ -1921,11 +1930,6 @@ void pa__done(pa_module *m) {
     if (u->card)
         pa_card_free(u->card);
 
-    pa_thread_mq_done(&u->thread_mq);
-
-    if (u->rtpoll)
-        pa_rtpoll_free(u->rtpoll);
-
     if (u->read_smoother)
         pa_smoother_free(u->read_smoother);
 
diff --git a/src/pulsecore/rtpoll.c b/src/pulsecore/rtpoll.c
index 543262b..183d97c 100644
--- a/src/pulsecore/rtpoll.c
+++ b/src/pulsecore/rtpoll.c
@@ -156,7 +156,7 @@ void pa_rtpoll_install(pa_rtpoll *p) {
     pa_assert(p);
     pa_assert(!p->installed);
 
-    p->installed = 1;
+    p->installed = TRUE;
 
 #ifdef HAVE_PPOLL
 # ifdef __linux__

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list