diff options
author | Sander Vrijders <[email protected]> | 2016-07-05 15:43:13 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-07-05 15:43:13 +0200 |
commit | a315150a16c02f3cb694e639d5aba555fce4b4c3 (patch) | |
tree | 59525d68eec0cf5d2dae83891c7bc4eaabff9cf3 /src/lib/sockets.c | |
parent | aca5db11a73e66377b8566e69c1baabb1df803ab (diff) | |
download | ouroboros-a315150a16c02f3cb694e639d5aba555fce4b4c3.tar.gz ouroboros-a315150a16c02f3cb694e639d5aba555fce4b4c3.zip |
lib: Provide first implementation of revised CDAP
This commit introduces a first version of the revised CDAP
specification. CACEP (for authentication purposes) has been separated
from CDAP. Application developers may use CDAP if they find it
useful. Within Ouroboros CDAP will be used to perform operations on
the RIB of an IPCP.
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r-- | src/lib/sockets.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c index 9bfbad5e..d60ea91a 100644 --- a/src/lib/sockets.c +++ b/src/lib/sockets.c @@ -32,6 +32,7 @@ #include <sys/un.h> #include <string.h> #include <stdlib.h> +#include <errno.h> int client_socket_open(char * file_name) { @@ -109,8 +110,8 @@ irm_msg_t * send_recv_irm_msg(irm_msg_t * msg) if (sockfd < 0) return NULL; - buf.size = irm_msg__get_packed_size(msg); - if (buf.size == 0) { + buf.len = irm_msg__get_packed_size(msg); + if (buf.len == 0) { close(sockfd); return NULL; } @@ -123,7 +124,7 @@ irm_msg_t * send_recv_irm_msg(irm_msg_t * msg) irm_msg__pack(msg, buf.data); - if (write(sockfd, buf.data, buf.size) == -1) { + if (write(sockfd, buf.data, buf.len) == -1) { free(buf.data); close(sockfd); return NULL; |