diff options
author | Mattias Andrée <maandree@kth.se> | 2017-10-21 17:44:19 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2017-10-21 17:44:19 +0200 |
commit | 0a62c6e3f694e1fe5908fc51ce645f38676121e6 (patch) | |
tree | c966e221b69d4b5a3be578647b497438d6a33656 | |
parent | First commit (diff) | |
download | sbus-0a62c6e3f694e1fe5908fc51ce645f38676121e6.tar.gz sbus-0a62c6e3f694e1fe5908fc51ce645f38676121e6.tar.bz2 sbus-0a62c6e3f694e1fe5908fc51ce645f38676121e6.tar.xz |
libsbus_receive: add flags
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | libsbus.c | 4 | ||||
-rw-r--r-- | libsbus.h | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -60,12 +60,12 @@ libsbuf_prepare_message(const char *key, char *buf, size_t *remaining) } int -libsbus_receive(int fd, char *buf, union libsbus_packet *packet) +libsbus_receive(int fd, int flags, char *buf, union libsbus_packet *packet) { ssize_t r; char *p; - r = recv(fd, buf, LIBSBUS_BUFFER_SIZE, 0); + r = recv(fd, buf, LIBSBUS_BUFFER_SIZE, flags); if (r < 0) return -1; @@ -33,6 +33,6 @@ int libsbus_subscribe(int fd, const char *pattern, char *buf); int libsbus_unsubscribe(int fd, const char *pattern, char *buf); int libsbus_publish(int fd, const char *key, const char *msg, size_t n, char *buf); ssize_t libsbuf_prepare_message(const char *key, char *buf, size_t *remaining); -int libsbus_receive(int fd, char *buf, union libsbus_packet *packet); +int libsbus_receive(int fd, int flags, char *buf, union libsbus_packet *packet); #endif |