diff mbox series

[1/2] dpp: check that DPP is running in station watch

Message ID 20231116154439.33880-1-prestwoj@gmail.com (mailing list archive)
State New
Headers show
Series [1/2] dpp: check that DPP is running in station watch | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-makecheckvalgrind fail Make FAIL: src/dpp.c: In function 'dpp_handle_config_response_frame': src/dpp.c:1091:33: error: 'ssid_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1091 | params.ssid_len = ssid_len; | ~~~~~~~~~~~~~~~~^~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2570: src/dpp.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1733: all] Error 2
prestwoj/iwd-alpine-ci-makecheck pending makecheck SKIP
prestwoj/iwd-alpine-ci-incremental_build fail Make FAIL (patch 0): src/dpp.c: In function 'dpp_handle_config_response_frame': src/dpp.c:1088:33: error: 'ssid_len' may be used uninitialized in this function [-Werror=maybe-uninitialized] 1088 | params.ssid_len = ssid_len; | ~~~~~~~~~~~~~~~~^~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [Makefile:2539: src/dpp.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1713: all] Error 2
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-incremental_build success Incremental Build with patches
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood Nov. 16, 2023, 3:44 p.m. UTC
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(+)

Comments

Denis Kenzior Nov. 16, 2023, 3:48 p.m. UTC | #1
Hi James,

On 11/16/23 09:44, James Prestwood wrote:
> 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(+)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/src/dpp.c b/src/dpp.c
index 5cf9ca23..18b2a7c6 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -3686,6 +3686,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: