Code

client: Let sdb_client_recv() use sdb_proto_select().
authorSebastian Harl <sh@tokkee.org>
Thu, 19 Dec 2013 20:43:59 +0000 (21:43 +0100)
committerSebastian Harl <sh@tokkee.org>
Thu, 19 Dec 2013 20:43:59 +0000 (21:43 +0100)
src/client/sock.c

index 66b83a70009f16921ef70f8e487ae14eabe454dd..a2417ad6d872029e8c80f51d83899b65e9026a06 100644 (file)
@@ -233,7 +233,8 @@ sdb_client_recv(sdb_client_t *client,
        while (42) {
                ssize_t status;
 
-               /* XXX: use select */
+               if (sdb_proto_select(client->fd, SDB_PROTO_SELECTIN))
+                       return -1;
 
                errno = 0;
                status = sdb_strbuf_read(buf, client->fd, req);