audioc: Make all fds non-blocking.
[paraslash.git] / chunk_queue.c
index 61dd3820706515267c14d83d8e3254d59789a788..84f4a4a88ebfcb5acb4b0cfaf9dc861b87f82947 100644 (file)
@@ -62,7 +62,7 @@ int cq_enqueue(struct chunk_queue *cq, long unsigned chunk_num,
                if (ret < 0)
                        return ret;
        } else
-               buf = vss_get_header(&len);
+               vss_get_header(&buf, &len);
        if (cq->num_pending + len > cq->max_pending)
                return -E_QUEUE;
        qc = para_malloc(sizeof(struct queued_chunk));
@@ -133,7 +133,7 @@ int cq_get(struct queued_chunk *qc, char **buf, size_t *len)
                if (ret < 0)
                        return ret;
        } else
-               *buf = vss_get_header(len);
+               vss_get_header(buf, len);
        assert(*len > qc->sent);
        *buf += qc->sent;
        *len -= qc->sent;