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/ipcpd/ipcp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ipcpd/ipcp.c') diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 4acbffa2..579203c2 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -236,14 +236,14 @@ void * ipcp_main_loop(void * o) ipcp_msg__free_unpacked(msg, NULL); - buffer.size = ipcp_msg__get_packed_size(&ret_msg); - if (buffer.size == 0) { + buffer.len = ipcp_msg__get_packed_size(&ret_msg); + if (buffer.len == 0) { LOG_ERR("Failed to send reply message"); close(lsockfd); continue; } - buffer.data = malloc(buffer.size); + buffer.data = malloc(buffer.len); if (buffer.data == NULL) { close(lsockfd); continue; @@ -251,7 +251,7 @@ void * ipcp_main_loop(void * o) ipcp_msg__pack(&ret_msg, buffer.data); - if (write(lsockfd, buffer.data, buffer.size) == -1) { + if (write(lsockfd, buffer.data, buffer.len) == -1) { free(buffer.data); close(lsockfd); continue; -- cgit v1.2.3