mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
netdev: Add a NETDEV_RESULT_ABORTED
To be used so that the callback passed to netdev_connect can still be called when the connection attempt is being aborted.
This commit is contained in:
parent
3863f6d2bb
commit
f76a86d2b0
13
src/device.c
13
src/device.c
@ -580,9 +580,16 @@ static void device_connect_cb(struct netdev *netdev, enum netdev_result result,
|
||||
struct device *device = user_data;
|
||||
|
||||
if (result != NETDEV_RESULT_OK) {
|
||||
if (device->connect_pending)
|
||||
dbus_pending_reply(&device->connect_pending,
|
||||
dbus_error_failed(device->connect_pending));
|
||||
struct l_dbus_message *reply;
|
||||
|
||||
if (device->connect_pending) {
|
||||
if (result == NETDEV_RESULT_ABORTED)
|
||||
reply = dbus_error_aborted(device->connect_pending);
|
||||
else
|
||||
reply = dbus_error_failed(device->connect_pending);
|
||||
|
||||
dbus_pending_reply(&device->connect_pending, reply);
|
||||
}
|
||||
|
||||
if (device->state == DEVICE_STATE_CONNECTING)
|
||||
device_disassociated(device);
|
||||
|
@ -32,6 +32,7 @@ enum netdev_result {
|
||||
NETDEV_RESULT_ASSOCIATION_FAILED,
|
||||
NETDEV_RESULT_HANDSHAKE_FAILED,
|
||||
NETDEV_RESULT_KEY_SETTING_FAILED,
|
||||
NETDEV_RESULT_ABORTED,
|
||||
};
|
||||
|
||||
enum netdev_event {
|
||||
|
Loading…
Reference in New Issue
Block a user