$OpenBSD: patch-src_pulsecore_pstream_c,v 1.3 2012/05/14 17:45:16 ajacoutot Exp $

- Fix a lock-up.

--- src/pulsecore/pstream.c.orig	Thu Mar  1 10:02:19 2012
+++ src/pulsecore/pstream.c	Mon May 14 16:18:28 2012
@@ -177,14 +177,17 @@ static void do_something(pa_pstream *p) {
     p->mainloop->defer_enable(p->defer_event, 0);
 
     if (!p->dead && pa_iochannel_is_readable(p->io)) {
-        if (do_read(p) < 0)
+        if (do_read(p) < 0) {
             goto fail;
-    } else if (!p->dead && pa_iochannel_is_hungup(p->io))
+	}
+    } else if (!p->dead && pa_iochannel_is_hungup(p->io)) {
         goto fail;
+    }
 
     if (!p->dead && pa_iochannel_is_writable(p->io)) {
-        if (do_write(p) < 0)
+        if (do_write(p) < 0) {
             goto fail;
+	}
     }
 
     pa_pstream_unref(p);
