From a315150a16c02f3cb694e639d5aba555fce4b4c3 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 5 Jul 2016 15:43:13 +0200 Subject: 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. --- src/lib/sockets.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/sockets.c') 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 #include #include +#include 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; -- cgit v1.2.3