diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-03-30 17:25:30 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-03-30 18:02:25 +0200 |
commit | 08941177f030b77fb44238a7e589322d2e0fcaa2 (patch) | |
tree | e823d98180ea74d476466a862223a69d52308ffd /src/lib/sockets.c | |
parent | a3f002d6f2d102588f988c99eb16c64a68706dd2 (diff) | |
download | ouroboros-08941177f030b77fb44238a7e589322d2e0fcaa2.tar.gz ouroboros-08941177f030b77fb44238a7e589322d2e0fcaa2.zip |
lib, irmd: Update communication with IRMd
All messages sent to the IRMd now also get a reply back with the
result of the operation.
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; |