aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <prestwoj@gmail.com>2023-11-16 07:44:38 -0800
committerDenis Kenzior <denkenz@gmail.com>2023-11-16 09:47:41 -0600
commitaa116ba5229a2b355db2898c518da01e0c4a918b (patch)
tree287943a072feaa4cb5a0d20467d880081ecd5163
parent3c02f387cb7c19c7d6bb307d023f57cfb69c86f8 (diff)
dpp: check that DPP is running in station watch
This was causing unneeded WARNING prints because the DPP state was never checked. Fix this and bail out if DPP isn't running.
-rw-r--r--src/dpp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dpp.c b/src/dpp.c
index 41b7c70e0..36d5d62e5 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -3681,6 +3681,9 @@ static void dpp_station_state_watch(enum station_state state, void *user_data)
{
struct dpp_sm *dpp = user_data;
+ if (dpp->state == DPP_STATE_NOTHING)
+ return;
+
switch (state) {
case STATION_STATE_DISCONNECTED:
case STATION_STATE_DISCONNECTING: