summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-27 15:25:08 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-10-27 15:38:36 +0200
commit5e8400b3b148d78861152bd551800b1e93a58155 (patch)
treecdb3625d3c858d08bbccd4a69881933712b5f464 /src/irmd/main.c
parent6c2164a59ce4d3ed91a65326ac89bb247e9f622f (diff)
downloadouroboros-5e8400b3b148d78861152bd551800b1e93a58155.tar.gz
ouroboros-5e8400b3b148d78861152bd551800b1e93a58155.zip
irmd: Fix cleanup of pending flows
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r--src/irmd/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 548ab1db..2bb933c4 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1750,16 +1750,19 @@ void * irm_sanitize(void * o)
if (irm_flow_get_state(f) == FLOW_ALLOC_PENDING
&& ts_diff_ms(&f->t0, &now) > IRMD_FLOW_TIMEOUT) {
- LOG_INFO("Pending port_id %d timed out.",
+ bmp_release(irmd->port_ids, f->port_id);
+ list_del(&f->next);
+ LOG_DBG("Pending port_id %d timed out.",
f->port_id);
- irm_flow_set_state(f, FLOW_NULL);
+ ipcp_flow_dealloc(f->n_1_api, f->port_id);
+ irm_flow_destroy(f);
continue;
}
if (kill(f->n_api, 0) < 0) {
bmp_release(irmd->port_ids, f->port_id);
list_del(&f->next);
- LOG_INFO("AP-I %d gone, flow %d deallocated.",
+ LOG_DBG("AP-I %d gone, flow %d deallocated.",
f->n_api, f->port_id);
ipcp_flow_dealloc(f->n_1_api, f->port_id);
irm_flow_destroy(f);