From 301212fc967b51fd01e02c0dca8c9183db923b11 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 3 Jul 2018 15:51:16 +0200 Subject: ipcpd: React to flow events actively This adds the infrastructure to actively react to flow up, down and deallocated events. Signed-off-by: Sander Vrijders Signed-off-by: Dimitri Staessens --- src/ipcpd/normal/connmgr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ipcpd/normal/connmgr.c') diff --git a/src/ipcpd/normal/connmgr.c b/src/ipcpd/normal/connmgr.c index 9530633b..bf07ebc4 100644 --- a/src/ipcpd/normal/connmgr.c +++ b/src/ipcpd/normal/connmgr.c @@ -193,7 +193,9 @@ static void handle_event(void * self, (void) self; - if (!(event == NOTIFY_DT_FLOW_UP || event == NOTIFY_DT_FLOW_DOWN)) + if (!(event == NOTIFY_DT_FLOW_UP || + event == NOTIFY_DT_FLOW_DOWN || + event == NOTIFY_DT_FLOW_DEALLOC)) return; if (get_conn_by_fd(*((int *) o), COMPID_DT, &conn)) @@ -206,6 +208,9 @@ static void handle_event(void * self, case NOTIFY_DT_FLOW_DOWN: notifier_event(NOTIFY_DT_CONN_DOWN, &conn); break; + case NOTIFY_DT_FLOW_DEALLOC: + notifier_event(NOTIFY_DT_CONN_DEL, &conn); + break; default: break; } -- cgit v1.2.3