]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/ioline.c
* Increase history set to 64 to simplify reduction of indexes
[pulseaudio] / src / pulsecore / ioline.c
index 5fd2189b32969abc765c798396bd67a4fa7b476e..860a6511747644a3b28a4a6a2a89360ecd6b3653 100644 (file)
@@ -299,6 +299,10 @@ static int do_read(pa_ioline *l) {
 
         /* Read some data */
         if ((r = pa_iochannel_read(l->io, l->rbuf+l->rbuf_index+l->rbuf_valid_length, len)) <= 0) {
+
+            if (r < 0 && errno == EAGAIN)
+                return 0;
+
             if (r < 0 && errno != ECONNRESET) {
                 pa_log("read(): %s", pa_cstrerror(errno));
                 failure(l, 0);
@@ -328,6 +332,9 @@ static int do_write(pa_ioline *l) {
 
         if ((r = pa_iochannel_write(l->io, l->wbuf+l->wbuf_index, l->wbuf_valid_length)) <= 0) {
 
+            if (r < 0 && errno == EAGAIN)
+                return 0;
+
             if (r < 0 && errno != EPIPE)
                 pa_log("write(): %s", pa_cstrerror(errno));