From 694c62985a3f7057633986d813553bf612687eea Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 4 Aug 2016 11:33:13 -0500 Subject: [PATCH] device: on abort, don't call device_disassociated All of the abortion logic is invoked when device_disconnect is called. So there's no point calling device_disassociated in this case. This also prevents us from entering into autoconnect mode too early. --- src/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 57681116..971b3465 100644 --- a/src/device.c +++ b/src/device.c @@ -607,7 +607,9 @@ static void device_connect_cb(struct netdev *netdev, enum netdev_result result, } if (result != NETDEV_RESULT_OK) { - device_disassociated(device); + if (result != NETDEV_RESULT_ABORTED) + device_disassociated(device); + return; }