From 94afeabc18b705602dee67134300e43237d92463 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 11 Jan 2022 16:55:52 -0800 Subject: [PATCH] dpp: put no station device print behind else if The previous (incorrect) else was removed since it ended up printing in most cases since the if clause returned. This should have been an else if conditional from the start and only print if the station device was not found. --- src/dpp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dpp.c b/src/dpp.c index 9b67be40..459dc2e9 100644 --- a/src/dpp.c +++ b/src/dpp.c @@ -1717,9 +1717,8 @@ static struct l_dbus_message *dpp_dbus_start_enrollee(struct l_dbus *dbus, if (station && station_get_connected_network(station)) { l_warn("cannot be enrollee while connected, please disconnect"); return dbus_error_busy(message); - } - - l_debug("No station device, continuing anyways..."); + } else if (!station) + l_debug("No station device, continuing anyways..."); dpp->uri = dpp_generate_uri(dpp->pub_asn1, dpp->pub_asn1_len, 2, netdev_get_address(dpp->netdev), &freq,