commit 94afeabc18b705602dee67134300e43237d92463
parent 0c8d3f106ad869bac6d8708956486b9735708878
Author: James Prestwood <prestwoj@gmail.com>
Date: Tue, 11 Jan 2022 16:55:52 -0800
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.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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,