{
_dbus_pending_call_set_reply_unlocked (pending, message);
_dbus_pending_call_ref_unlocked (pending); /* in case there's no app with a ref held */
+ _dbus_pending_call_start_completion_unlocked(pending);
_dbus_connection_detach_pending_call_and_unlock (connection, pending);
-
+
/* Must be called unlocked since it invokes app callback */
- _dbus_pending_call_complete (pending);
+ _dbus_pending_call_finish_completion (pending);
dbus_pending_call_unref (pending);
}
DBusConnection * _dbus_pending_call_get_connection_and_lock (DBusPendingCall *pending);
DBusConnection * _dbus_pending_call_get_connection_unlocked (DBusPendingCall *pending);
dbus_bool_t _dbus_pending_call_get_completed_unlocked (DBusPendingCall *pending);
-void _dbus_pending_call_complete (DBusPendingCall *pending);
+
+void _dbus_pending_call_start_completion_unlocked (DBusPendingCall *pending);
+void _dbus_pending_call_finish_completion (DBusPendingCall *pending);
+
void _dbus_pending_call_set_reply_unlocked (DBusPendingCall *pending,
DBusMessage *message);
void _dbus_pending_call_queue_timeout_error_unlocked (DBusPendingCall *pending,
}
/**
- * Calls notifier function for the pending call
- * and sets the call to completed.
+ * Sets the pending call to completed
*
* @param pending the pending call
- *
*/
void
-_dbus_pending_call_complete (DBusPendingCall *pending)
+_dbus_pending_call_start_completion_unlocked (DBusPendingCall *pending)
{
_dbus_assert (!pending->completed);
pending->completed = TRUE;
+}
+
+/**
+ * Call the notifier function for the pending call.
+ *
+ * @param pending the pending call
+ */
+void
+_dbus_pending_call_finish_completion (DBusPendingCall *pending)
+{
+ _dbus_assert (pending->completed);
if (pending->function)
{