eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4a8a43965f67241579de64e8d99010e1393be6f3
parent 1a27cd1548cfcfbc4b22b3a36386a0fc98148fce
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 15 Dec 2021 09:41:46 -0800

offchannel: always call destroy right away on cancel

The main cancel code path was not calling destroy immediately which
was not consistent with other code paths/APIs.

Diffstat:
Msrc/offchannel.c | 22++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/offchannel.c b/src/offchannel.c @@ -208,20 +208,10 @@ void offchannel_cancel(uint64_t wdev_id, uint32_t id) goto work_done; } - /* - * Call destroy now to maintain consistency with any other - * path leading to radio_work_done(). But set needs_cancel so - * the ROC command can be canceled - */ - if (info->destroy) - info->destroy(info->error, info->user_data); - - info->destroy = NULL; - info->started = NULL; - info->user_data = NULL; + /* Lets the ROC callback know it needs to cancel the request */ info->needs_cancel = true; - return; + goto destroy; } /* @@ -239,6 +229,14 @@ void offchannel_cancel(uint64_t wdev_id, uint32_t id) */ offchannel_cancel_roc(info); +destroy: + if (info->destroy) + info->destroy(info->error, info->user_data); + + info->destroy = NULL; + info->started = NULL; + info->user_data = NULL; + return; work_done: