diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-05 16:36:40 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-05 16:36:40 +0200 |
commit | 51ccc34e0fe15aaf711f30fa8b63de1e1881029f (patch) | |
tree | 6c75a9574860e436287c5344ad8364d412c73543 /src/lib/ipcp.c | |
parent | 627c11526e57b94d466a7d7acd4fe0bf8cd2b776 (diff) | |
parent | daa4e408b3e34bdc228d26816de09d7d1fb9b043 (diff) | |
download | ouroboros-51ccc34e0fe15aaf711f30fa8b63de1e1881029f.tar.gz ouroboros-51ccc34e0fe15aaf711f30fa8b63de1e1881029f.zip |
Merged in sandervrijders/ouroboros/be (pull request #154)
lib: Provide first implementation of revised CDAP
Diffstat (limited to 'src/lib/ipcp.c')
-rw-r--r-- | src/lib/ipcp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c index 2b6b6825..b336155e 100644 --- a/src/lib/ipcp.c +++ b/src/lib/ipcp.c @@ -32,6 +32,8 @@ #include <stdlib.h> #include <string.h> #include <signal.h> +#include <errno.h> +#include <stdbool.h> #include <sys/types.h> #include <sys/wait.h> @@ -54,8 +56,8 @@ static ipcp_msg_t * send_recv_ipcp_msg(pid_t api, return NULL; } - buf.size = ipcp_msg__get_packed_size(msg); - if (buf.size == 0) { + buf.len = ipcp_msg__get_packed_size(msg); + if (buf.len == 0) { close(sockfd); free(sock_path); return NULL; @@ -70,7 +72,7 @@ static ipcp_msg_t * send_recv_ipcp_msg(pid_t api, ipcp_msg__pack(msg, buf.data); - if (write(sockfd, buf.data, buf.size) == -1) { + if (write(sockfd, buf.data, buf.len) == -1) { free(sock_path); free(buf.data); close(sockfd); |