summaryrefslogtreecommitdiff
path: root/src/lib/sockets.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-04-06 09:30:01 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-04-06 09:30:01 +0000
commit34ef0da6c1b3a3419dbdf2041ed1e3ba107dc915 (patch)
treed8e793cffbe829d64855eaa5a429b90ebe3dc3a4 /src/lib/sockets.c
parentc6ad4f96f8bb2f1ee749e92308e7173523ddd0b8 (diff)
parente1c0714d5827cd927961f3a687d9720e6e9aa802 (diff)
downloadouroboros-34ef0da6c1b3a3419dbdf2041ed1e3ba107dc915.tar.gz
ouroboros-34ef0da6c1b3a3419dbdf2041ed1e3ba107dc915.zip
Merged in dstaesse/ouroboros/be-tim (pull request #464)
lib, irmd: Implement flow allocation timeout
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r--src/lib/sockets.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c
index 3a26a2cf..63f928cf 100644
--- a/src/lib/sockets.c
+++ b/src/lib/sockets.c
@@ -95,23 +95,17 @@ static void close_ptr(void * o)
close(*(int *) o);
}
-static irm_msg_t * send_recv_irm_msg_timed(irm_msg_t * msg, bool timed)
+irm_msg_t * send_recv_irm_msg(irm_msg_t * msg)
{
int sockfd;
buffer_t buf;
ssize_t count = 0;
irm_msg_t * recv_msg = NULL;
- struct timeval tv = {(SOCKET_TIMEOUT / 1000),
- (SOCKET_TIMEOUT % 1000) * 1000};
sockfd = client_socket_open(IRM_SOCK_PATH);
if (sockfd < 0)
return NULL;
- if (timed)
- setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO,
- (void *) &tv, sizeof(tv));
-
buf.len = irm_msg__get_packed_size(msg);
if (buf.len == 0) {
close(sockfd);
@@ -141,12 +135,6 @@ static irm_msg_t * send_recv_irm_msg_timed(irm_msg_t * msg, bool timed)
return recv_msg;
}
-irm_msg_t * send_recv_irm_msg(irm_msg_t * msg)
-{ return send_recv_irm_msg_timed(msg, true); }
-
-irm_msg_t * send_recv_irm_msg_b(irm_msg_t * msg)
-{ return send_recv_irm_msg_timed(msg, false); }
-
char * ipcp_sock_path(pid_t api)
{
char * full_name = NULL;