From f4201d06c2ae643dd90313228d2d0e5c768185c3 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 2 Aug 2016 16:51:28 -0500 Subject: [PATCH] device: Remove pointless check This was introduced by commit f468fceb0264791d6acc297136eb26080aca4216. However, after commit 2d78f51fac66b9beff03a56f12e5fb8456625f07, the connect_cb is called from inside netdev_disconnect. This in turn causes the dbus-reply to be sent out if needed. So by the time we get to the code in question, connect_pending is always NULL. --- src/device.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/device.c b/src/device.c index b3d8522c..9157f494 100644 --- a/src/device.c +++ b/src/device.c @@ -805,11 +805,6 @@ int device_disconnect(struct device *device) if (netdev_disconnect(device->netdev, device_disconnect_cb, device) < 0) return -EIO; - if (device->state == DEVICE_STATE_CONNECTING) - if (device->connect_pending) - dbus_pending_reply(&device->connect_pending, - dbus_error_aborted(device->connect_pending)); - /* * If the disconnect somehow fails we won't know if we're still * connected so we may as well indicate now that we're no longer