From aa116ba5229a2b355db2898c518da01e0c4a918b Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 16 Nov 2023 07:44:38 -0800 Subject: [PATCH] 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. --- src/dpp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dpp.c b/src/dpp.c index 41b7c70e..36d5d62e 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: