Commit 4ec90c8e authored by Slava Monich's avatar Slava Monich

[connman] Prevent dbus_connection_dispatch recursion

Because it's a guaranteed deadlock.
parent 9c254987
......@@ -67,10 +67,20 @@ static gboolean disconnected_signal(DBusConnection *conn,
static gboolean message_dispatch(void *data)
DBusConnection *conn = data;
static gboolean in_dispatch = FALSE;
if (in_dispatch) {
return FALSE;
in_dispatch = TRUE;
/* Dispatch messages */
while (dbus_connection_dispatch(conn) == DBUS_DISPATCH_DATA_REMAINS);
in_dispatch = FALSE;
return FALSE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment