diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-28 17:35:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-28 17:35:24 +0200 |
commit | dd1c3586642b596fb2040532a77a2e5beb8400eb (patch) | |
tree | c975e37e898f4f2833ca28c3d29f17c9b0d30263 /src/libmdsserver | |
parent | derp (diff) | |
download | mds-dd1c3586642b596fb2040532a77a2e5beb8400eb.tar.gz mds-dd1c3586642b596fb2040532a77a2e5beb8400eb.tar.bz2 mds-dd1c3586642b596fb2040532a77a2e5beb8400eb.tar.xz |
we should of cause use recv and not read
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/libmdsserver/mds-message.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libmdsserver/mds-message.c b/src/libmdsserver/mds-message.c index 705367b..a999c2a 100644 --- a/src/libmdsserver/mds-message.c +++ b/src/libmdsserver/mds-message.c @@ -21,6 +21,7 @@ #include <string.h> #include <errno.h> #include <unistd.h> +#include <sys/socket.h> /** @@ -282,7 +283,7 @@ int mds_message_read(mds_message_t* this, int fd) /* Then read from the file descriptor. */ errno = 0; - got = read(fd, this->buffer + this->buffer_ptr, n); + got = recv(fd, this->buffer + this->buffer_ptr, n, 0); this->buffer_ptr += (size_t)(got < 0 ? 0 : got); if (errno) return -1; |