diff options
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index aac47adb..740472b9 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1241,8 +1241,12 @@ static int flow_alloc_res(int port_id) pthread_rwlock_unlock(&irmd->flows_lock); pthread_rwlock_unlock(&irmd->state_lock); - if (irm_flow_wait_state(f, FLOW_ALLOCATED) == FLOW_ALLOCATED) + if (irm_flow_wait_state(f, FLOW_ALLOCATED) == FLOW_ALLOCATED) { + LOG_INFO("Flow on port_id %d allocated.", port_id); return 0; + } + + LOG_INFO("Pending flow on port_id %d torn down.", port_id); return -1; } @@ -1344,6 +1348,7 @@ static struct irm_flow * flow_req_arr(pid_t api, struct pid_el * c_api; pid_t h_api = -1; + int port_id = -1; LOG_DBGF("Flow req arrived from IPCP %d for %s on AE %s.", api, dst_name, ae_name); @@ -1462,7 +1467,7 @@ static struct irm_flow * flow_req_arr(pid_t api, pthread_rwlock_unlock(&irmd->reg_lock); pthread_rwlock_wrlock(&irmd->flows_lock); - f->port_id = bmp_allocate(irmd->port_ids); + port_id = f->port_id = bmp_allocate(irmd->port_ids); if (!bmp_is_id_valid(irmd->port_ids, f->port_id)) { pthread_rwlock_unlock(&irmd->flows_lock); pthread_rwlock_unlock(&irmd->state_lock); @@ -1527,6 +1532,8 @@ static struct irm_flow * flow_req_arr(pid_t api, pthread_mutex_unlock(&re->state_lock); + LOG_INFO("Flow on port_id %d allocated.", port_id); + return f; } |