[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.13-242-g20edd84

Lennart Poettering gitmailer-noreply at 0pointer.de
Wed Jan 14 08:36:50 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  587a08bae417d65f5b51da50706fe1c964275f1d (commit)

- Log -----------------------------------------------------------------
20edd84... make pa_asyncq_push() fail under no circumstances.
-----------------------------------------------------------------------

Summary of changes:
 src/pulsecore/asyncq.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

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

commit 20edd846d073507adcfd30d2eb678f965de37e2d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jan 14 17:36:44 2009 +0100

    make pa_asyncq_push() fail under no circumstances.

diff --git a/src/pulsecore/asyncq.c b/src/pulsecore/asyncq.c
index f64931a..c981505 100644
--- a/src/pulsecore/asyncq.c
+++ b/src/pulsecore/asyncq.c
@@ -163,14 +163,14 @@ static int push(pa_asyncq*l, void *p, pa_bool_t wait) {
     return 0;
 }
 
-static pa_bool_t flush_postq(pa_asyncq *l) {
+static pa_bool_t flush_postq(pa_asyncq *l, pa_bool_t wait) {
     struct localq *q;
 
     pa_assert(l);
 
     while ((q = l->last_localq)) {
 
-        if (push(l, q->data, FALSE) < 0)
+        if (push(l, q->data, wait) < 0)
             return FALSE;
 
         l->last_localq = q->prev;
@@ -187,7 +187,7 @@ static pa_bool_t flush_postq(pa_asyncq *l) {
 int pa_asyncq_push(pa_asyncq*l, void *p, pa_bool_t wait) {
     pa_assert(l);
 
-    if (!flush_postq(l))
+    if (!flush_postq(l, wait))
         return -1;
 
     return push(l, p, wait);
@@ -199,8 +199,9 @@ void pa_asyncq_post(pa_asyncq*l, void *p) {
     pa_assert(l);
     pa_assert(p);
 
-    if (pa_asyncq_push(l, p, FALSE) >= 0)
-        return;
+    if (flush_postq(l, FALSE))
+        if (pa_asyncq_push(l, p, FALSE) >= 0)
+            return;
 
     /* OK, we couldn't push anything in the queue. So let's queue it
      * locally and push it later */
@@ -299,7 +300,7 @@ void pa_asyncq_write_before_poll(pa_asyncq *l) {
 
     for (;;) {
 
-        if (flush_postq(l))
+        if (flush_postq(l, FALSE))
             break;
 
         if (pa_fdsem_before_poll(l->read_fdsem) >= 0) {

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list