diff options
author | dimitri staessens <[email protected]> | 2016-05-29 10:15:22 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-05-29 10:15:54 +0200 |
commit | 462a3fb9b915dedf8b061b68a4db93f6e22ab29d (patch) | |
tree | 27d596fc4403363cfda9af734fc54edfad5258bd /src/ipcpd/shim-udp | |
parent | ee1974debcfba8d8b10ea9a60437d04502b965dc (diff) | |
download | ouroboros-462a3fb9b915dedf8b061b68a4db93f6e22ab29d.tar.gz ouroboros-462a3fb9b915dedf8b061b68a4db93f6e22ab29d.zip |
ipcpd: fixes shutdown lockup in local and shim-udp
Diffstat (limited to 'src/ipcpd/shim-udp')
-rw-r--r-- | src/ipcpd/shim-udp/main.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c index 33b4be2f..48fa141e 100644 --- a/src/ipcpd/shim-udp/main.c +++ b/src/ipcpd/shim-udp/main.c @@ -775,6 +775,11 @@ static void * ipcp_udp_sdu_loop(void * o) int len = 0; char * buf; + e = shm_ap_rbuff_read(_ap_instance->rb); + if (e == NULL) { + continue; + } + rw_lock_rdlock(&_ipcp->state_lock); if (_ipcp->state != IPCP_ENROLLED) { @@ -782,12 +787,6 @@ static void * ipcp_udp_sdu_loop(void * o) return (void *) 1; /* -ENOTENROLLED */ } - e = shm_ap_rbuff_read(_ap_instance->rb); - if (e == NULL) { - rw_lock_unlock(&_ipcp->state_lock); - continue; - } - len = shm_du_map_read_sdu((uint8_t **) &buf, _ap_instance->dum, e->index); |