]> git.tue.mpg.de Git - paraslash.git/commitdiff
dccp_send.c: Simplify send_queued_chunks().
authorAndre Noll <maan@systemlinux.org>
Sun, 12 Aug 2007 21:36:51 +0000 (23:36 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 12 Aug 2007 21:36:51 +0000 (23:36 +0200)
The dccp socket is non-blocking, so there's no need to
check for writability.

dccp_send.c

index 2c8f800f995ef8fafc6e97b35d3f4420ccddb60e..b5373e0e2fb32a8b03f2004924bec0b38c367fea 100644 (file)
@@ -163,9 +163,7 @@ static int send_queued_chunks(struct dccp_client *dc)
        while ((qc = cq_peek(dc->cq))) {
                char *buf;
                size_t len;
-               int ret = write_ok(dc->fd);
-               if (ret <= 0)
-                       return ret? -E_WRITE_OK : 0;
+               int ret;
                cq_get(qc, &buf, &len);
                ret = dccp_write(dc->fd, buf, len);
                if (ret < 0)