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.
This commit is contained in:
James Prestwood 2022-01-11 16:55:52 -08:00 committed by Denis Kenzior
parent 0c8d3f106a
commit 94afeabc18
1 changed files with 2 additions and 3 deletions

View File

@ -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,