In case ACL connection failed to establish, all pending services shall
be always removed. At the moment it's only done in case there's pending
Connect message which does not take into account reconnect scenario,
i.e. service connection was triggered by reconnection timeout and there
is no pending message.
In such case, when reconnection failed there will be some services on
pending list and subsequent reconnect attempts will fail with EBUSY
immediately.
Change-Id: I785bd791c8623a4452310d410e3dbb524e9976ec
Signed-off-by: Sebastian Chlad <sebastianx.chlad@intel.com>
return;
done:
+ g_slist_free(dev->pending);
+ dev->pending = NULL;
+
if (!dev->connect)
return;
g_dbus_send_reply(dbus_conn, dev->connect, DBUS_TYPE_INVALID);
}
- g_slist_free(dev->pending);
- dev->pending = NULL;
-
dbus_message_unref(dev->connect);
dev->connect = NULL;
}