{
DBusDispatchStatus dstatus;
dbus_bool_t no_progress_possible;
+
+ /* Need to grab a ref here in case we're a private connection and
+ * the user drops the last ref in a handler we call; see bug
+ * https://bugs.freedesktop.org/show_bug.cgi?id=15635
+ */
+ dbus_connection_ref (connection);
dstatus = dbus_connection_get_dispatch_status (connection);
connection->disconnect_message_link == NULL;
else
no_progress_possible = _dbus_connection_get_is_connected_unlocked (connection);
+
CONNECTION_UNLOCK (connection);
+
+ dbus_connection_unref (connection);
+
return !no_progress_possible; /* TRUE if we can make more progress */
}