diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ipcpd/shim-udp/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index 9c295e30..74fa0d2b 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -395,6 +395,7 @@ static void * ipcp_udp_listener() } /* reply to IRM */ + rw_lock_wrlock(&_ap_instance->flows_lock); port_id = ipcp_flow_req_arr(getpid(), buf, @@ -404,11 +405,10 @@ static void * ipcp_udp_listener() if (port_id < 0) { LOG_ERR("Could not get port id from IRMd"); close(fd); + rw_lock_unlock(&_ap_instance->flows_lock); continue; } - rw_lock_wrlock(&_ap_instance->flows_lock); - _ap_instance->flows[fd].port_id = port_id; _ap_instance->flows[fd].rb = NULL; _ap_instance->flows[fd].state = FLOW_PENDING; |