summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-10 23:40:34 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-10 23:45:24 +0100
commitf87a2bc5199104d87ccc48dcc2b0e18d345a9bb4 (patch)
treee883c1bb2d1e2769bdadf937def235756af95c3b /src
parenta6309410ffb6b4531044c3b52cb6a79cfdcde231 (diff)
downloadouroboros-f87a2bc5199104d87ccc48dcc2b0e18d345a9bb4.tar.gz
ouroboros-f87a2bc5199104d87ccc48dcc2b0e18d345a9bb4.zip
ipcpd: Silent shutdown of normal
The acceptor will not log disconnects with IRMd. Unexpected disconnects will be reported and handled by management components.
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/normal/main.c5
-rw-r--r--src/irmd/main.c2
-rw-r--r--src/lib/dev.c5
3 files changed, 9 insertions, 3 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c
index 81912614..11ec0938 100644
--- a/src/ipcpd/normal/main.c
+++ b/src/ipcpd/normal/main.c
@@ -30,6 +30,7 @@
#include <ouroboros/irm.h>
#include <ouroboros/rib.h>
#include <ouroboros/irm_config.h>
+#include <ouroboros/errno.h>
#include "addr_auth.h"
#include "ae.h"
@@ -45,7 +46,6 @@
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
-#include <errno.h>
#include <assert.h>
#include <inttypes.h>
@@ -108,7 +108,8 @@ static void * flow_acceptor(void * o)
fd = flow_accept(&ae_name, &qs);
if (fd < 0) {
- log_warn("Flow accept failed.");
+ if (fd != -EIRMD)
+ log_warn("Flow accept failed: %d", fd);
continue;
}
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 74cb8359..2454a9ca 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1888,7 +1888,7 @@ void * mainloop(void * o)
(qoscube_t *) &ret_msg.qoscube);
if (e == NULL) {
ret_msg.has_result = true;
- ret_msg.result = -1;
+ ret_msg.result = -EIRMD;
break;
}
ret_msg.has_port_id = true;
diff --git a/src/lib/dev.c b/src/lib/dev.c
index 38f7cddf..4d85a5d9 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -402,6 +402,11 @@ int flow_accept(char ** ae_name,
if (recv_msg == NULL)
return -EIRMD;
+ if (recv_msg->has_result) {
+ irm_msg__free_unpacked(recv_msg, NULL);
+ return -EIRMD;
+ }
+
if (!recv_msg->has_api || !recv_msg->has_port_id) {
irm_msg__free_unpacked(recv_msg, NULL);
return -1;