+connection_timeout_and_complete_all_pending_calls_unlocked (DBusConnection *connection)
+{
+ DBusHashIter iter;
+
+ _dbus_hash_iter_init (connection->pending_replies, &iter);
+
+ /* create list while we remove the iters from the hash
+ because we need to go over it a couple of times */
+ while (_dbus_hash_iter_next (&iter))
+ {
+ DBusPendingCall *pending;
+
+ pending = (DBusPendingCall *) _dbus_hash_iter_get_value (&iter);
+ dbus_pending_call_ref (pending);
+
+ _dbus_pending_call_queue_timeout_error (pending,
+ connection);
+ _dbus_connection_remove_timeout_unlocked (connection,
+ _dbus_pending_call_get_timeout (pending));
+
+ _dbus_hash_iter_remove_entry (&iter);
+
+ dbus_pending_call_unref (pending);
+ }
+}
+
+static void