diff --git a/src/client/sock.c b/src/client/sock.c
index a2417ad6d872029e8c80f51d83899b65e9026a06..59c77873e08411b22a9c1e5a6a857a8e269210f5 100644 (file)
--- a/src/client/sock.c
+++ b/src/client/sock.c
return 0;
} /* sdb_client_connect */
+int
+sdb_client_sockfd(sdb_client_t *client)
+{
+ if (! client)
+ return -1;
+ return client->fd;
+} /* sdb_client_sockfd */
+
void
sdb_client_close(sdb_client_t *client)
{
size_t data_offset = sdb_strbuf_len(buf);
+ if (code)
+ *code = UINT32_MAX;
+
if ((! client) || (! client->fd) || (! buf)) {
errno = EBADF;
return -1;
}
- if (code)
- *code = UINT32_MAX;
-
while (42) {
ssize_t status;