diff options
author | Dimitri Staessens <[email protected]> | 2016-03-30 18:32:33 +0200 |
---|---|---|
committer | Dimitri Staessens <[email protected]> | 2016-03-30 18:32:33 +0200 |
commit | 850cefe748364b0b5154c10ac4d9e2b35600efd6 (patch) | |
tree | ec127e49cdd695381651cd8a942caaeaef3a11da /src/lib/sockets.c | |
parent | a7e83f9c190dfbebd891992ed0254435edf48aa4 (diff) | |
parent | 08941177f030b77fb44238a7e589322d2e0fcaa2 (diff) | |
download | ouroboros-850cefe748364b0b5154c10ac4d9e2b35600efd6.tar.gz ouroboros-850cefe748364b0b5154c10ac4d9e2b35600efd6.zip |
Merged in sandervrijders/ouroboros/be-irmd (pull request #48)
lib, irmd: Update communication with IRMd
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r-- | src/lib/sockets.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c index a699206d..f9024f70 100644 --- a/src/lib/sockets.c +++ b/src/lib/sockets.c @@ -96,41 +96,6 @@ int server_socket_open(char * file_name) return sockfd; } -int send_irm_msg(irm_msg_t * msg) -{ - int sockfd; - buffer_t buf; - - sockfd = client_socket_open(IRM_SOCK_PATH); - if (sockfd < 0) - return -1; - - buf.size = irm_msg__get_packed_size(msg); - if (buf.size == 0) { - close(sockfd); - return -1; - } - - buf.data = malloc(buf.size); - if (buf.data == NULL) { - close(sockfd); - return -ENOMEM; - } - - irm_msg__pack(msg, buf.data); - - if (write(sockfd, buf.data, buf.size) == -1) { - free(buf.data); - close(sockfd); - return -1; - } - - free(buf.data); - - close(sockfd); - return 0; -} - irm_msg_t * send_recv_irm_msg(irm_msg_t * msg) { int sockfd; |