25 #include "dbus-shared.h"
26 #include "dbus-connection.h"
27 #include "dbus-list.h"
28 #include "dbus-timeout.h"
29 #include "dbus-transport.h"
30 #include "dbus-watch.h"
31 #include "dbus-connection-internal.h"
32 #include "dbus-pending-call-internal.h"
33 #include "dbus-list.h"
34 #include "dbus-hash.h"
35 #include "dbus-message-internal.h"
36 #include "dbus-message-private.h"
37 #include "dbus-threads.h"
38 #include "dbus-protocol.h"
39 #include "dbus-dataslot.h"
40 #include "dbus-string.h"
41 #include "dbus-signature.h"
42 #include "dbus-pending-call.h"
43 #include "dbus-object-tree.h"
44 #include "dbus-threads-internal.h"
46 #include "dbus-marshal-basic.h"
48 #ifdef DBUS_DISABLE_CHECKS
49 #define TOOK_LOCK_CHECK(connection)
50 #define RELEASING_LOCK_CHECK(connection)
51 #define HAVE_LOCK_CHECK(connection)
53 #define TOOK_LOCK_CHECK(connection) do { \
54 _dbus_assert (!(connection)->have_connection_lock); \
55 (connection)->have_connection_lock = TRUE; \
57 #define RELEASING_LOCK_CHECK(connection) do { \
58 _dbus_assert ((connection)->have_connection_lock); \
59 (connection)->have_connection_lock = FALSE; \
61 #define HAVE_LOCK_CHECK(connection) _dbus_assert ((connection)->have_connection_lock)
67 #define CONNECTION_LOCK(connection) do { \
68 if (TRACE_LOCKS) { _dbus_verbose ("LOCK\n"); } \
69 _dbus_rmutex_lock ((connection)->mutex); \
70 TOOK_LOCK_CHECK (connection); \
73 #define CONNECTION_UNLOCK(connection) _dbus_connection_unlock (connection)
75 #define SLOTS_LOCK(connection) do { \
76 _dbus_rmutex_lock ((connection)->slot_mutex); \
79 #define SLOTS_UNLOCK(connection) do { \
80 _dbus_rmutex_unlock ((connection)->slot_mutex); \
83 #define DISPATCH_STATUS_NAME(s) \
84 ((s) == DBUS_DISPATCH_COMPLETE ? "complete" : \
85 (s) == DBUS_DISPATCH_DATA_REMAINS ? "data remains" : \
86 (s) == DBUS_DISPATCH_NEED_MEMORY ? "need memory" : \
206 #ifdef DBUS_ENABLE_VERBOSE_MODE
213 static int enabled = -1;
215 _dbus_trace_ref (
"DBusConnection", connection, old_refcount, new_refcount,
216 why,
"DBUS_CONNECTION_TRACE", &enabled);
219 #define _dbus_connection_trace_ref(c,o,n,w) \
254 #if HAVE_DECL_MSG_NOSIGNAL
336 #ifndef DBUS_DISABLE_CHECKS
340 #ifndef DBUS_DISABLE_CHECKS
346 static void _dbus_connection_update_dispatch_status_and_unlock (
DBusConnection *connection,
348 static void _dbus_connection_last_unref (
DBusConnection *connection);
349 static void _dbus_connection_acquire_dispatch (
DBusConnection *connection);
350 static void _dbus_connection_release_dispatch (
DBusConnection *connection);
352 static void _dbus_connection_close_possibly_shared_and_unlock (
DBusConnection *connection);
355 dbus_uint32_t client_serial);
360 #ifdef DBUS_DISABLE_ASSERT
363 dbus_int32_t old_value;
375 dbus_int32_t old_value;
413 _dbus_verbose (
"UNLOCK\n");
421 RELEASING_LOCK_CHECK (connection);
449 #ifdef DBUS_BUILD_TESTS
491 dbus_uint32_t reply_serial;
498 message = link->
data;
502 if (reply_serial != 0)
520 _dbus_connection_wakeup_mainloop (connection);
522 _dbus_verbose (
"Message %p (%s %s %s %s '%s' reply to %u) added to incoming queue %p, %d incoming\n",
539 _dbus_message_trace_ref (message, -1, -1,
540 "_dbus_conection_queue_received_message_link");
555 HAVE_LOCK_CHECK (connection);
561 _dbus_connection_wakeup_mainloop (connection);
563 _dbus_message_trace_ref (link->
data, -1, -1,
564 "_dbus_connection_queue_synthesized_message_link");
566 _dbus_verbose (
"Synthesized message %p added to incoming queue %p, %d incoming\n",
581 HAVE_LOCK_CHECK (connection);
599 _dbus_return_val_if_fail (connection !=
NULL,
FALSE);
618 HAVE_LOCK_CHECK (connection);
637 HAVE_LOCK_CHECK (connection);
654 _dbus_verbose (
"Message %p (%s %s %s %s '%s') removed from outgoing queue %p, %d left to send\n",
697 HAVE_LOCK_CHECK (connection);
720 retval = (* add_function) (connection->
watches, watch);
721 else if (remove_function)
724 (* remove_function) (connection->
watches, watch);
729 (* toggle_function) (connection->
watches, watch, enabled);
753 return protected_change_watch (connection, watch,
771 protected_change_watch (connection, watch,
794 protected_change_watch (connection, watch,
821 HAVE_LOCK_CHECK (connection);
844 retval = (* add_function) (connection->
timeouts, timeout);
845 else if (remove_function)
848 (* remove_function) (connection->
timeouts, timeout);
853 (* toggle_function) (connection->
timeouts, timeout, enabled);
877 return protected_change_timeout (connection, timeout,
895 protected_change_timeout (connection, timeout,
916 protected_change_timeout (connection, timeout,
923 _dbus_connection_attach_pending_call_unlocked (
DBusConnection *connection,
926 dbus_uint32_t reply_serial;
929 HAVE_LOCK_CHECK (connection);
949 HAVE_LOCK_CHECK (connection);
961 HAVE_LOCK_CHECK (connection);
968 HAVE_LOCK_CHECK (connection);
974 free_pending_call_on_hash_removal (
void *data)
986 HAVE_LOCK_CHECK (connection);
1008 _dbus_connection_detach_pending_call_unlocked (
DBusConnection *connection,
1019 _dbus_connection_detach_pending_call_and_unlock (
DBusConnection *connection,
1055 _dbus_connection_detach_pending_call_and_unlock (connection, pending);
1069 int timeout_milliseconds)
1073 HAVE_LOCK_CHECK (connection);
1081 _dbus_verbose (
"locking io_path_mutex\n");
1084 _dbus_verbose (
"start connection->io_path_acquired = %d timeout = %d\n",
1087 we_acquired =
FALSE;
1091 if (timeout_milliseconds != -1)
1093 _dbus_verbose (
"waiting %d for IO path to be acquirable\n",
1094 timeout_milliseconds);
1098 timeout_milliseconds))
1114 _dbus_verbose (
"waiting for IO path to be acquirable\n");
1127 _dbus_verbose (
"end connection->io_path_acquired = %d we_acquired = %d\n",
1130 _dbus_verbose (
"unlocking io_path_mutex\n");
1135 HAVE_LOCK_CHECK (connection);
1152 HAVE_LOCK_CHECK (connection);
1154 _dbus_verbose (
"locking io_path_mutex\n");
1159 _dbus_verbose (
"start connection->io_path_acquired = %d\n",
1165 _dbus_verbose (
"unlocking io_path_mutex\n");
1208 int timeout_milliseconds)
1210 _dbus_verbose (
"start\n");
1212 HAVE_LOCK_CHECK (connection);
1215 flags &= ~DBUS_ITERATION_DO_WRITING;
1217 if (_dbus_connection_acquire_io_path (connection,
1218 (flags & DBUS_ITERATION_BLOCK) ? timeout_milliseconds : 0))
1220 HAVE_LOCK_CHECK (connection);
1224 _dbus_verbose (
"pending call completed while acquiring I/O path");
1226 else if ( (pending !=
NULL) &&
1227 _dbus_connection_peek_for_reply_unlocked (connection,
1230 _dbus_verbose (
"pending call completed while acquiring I/O path (reply found in queue)");
1235 flags, timeout_milliseconds);
1238 _dbus_connection_release_io_path (connection);
1241 HAVE_LOCK_CHECK (connection);
1243 _dbus_verbose (
"end\n");
1269 pending_replies =
NULL;
1270 timeout_list =
NULL;
1271 disconnect_link =
NULL;
1272 disconnect_message =
NULL;
1273 outgoing_counter =
NULL;
1277 if (watch_list ==
NULL)
1281 if (timeout_list ==
NULL)
1288 if (pending_replies ==
NULL)
1292 if (connection ==
NULL)
1323 if (disconnect_message ==
NULL)
1327 if (disconnect_link ==
NULL)
1331 if (outgoing_counter ==
NULL)
1335 if (objects ==
NULL)
1338 if (_dbus_modify_sigpipe)
1344 connection->
watches = watch_list;
1345 connection->
timeouts = timeout_list;
1350 connection->
objects = objects;
1357 #ifndef DBUS_DISABLE_CHECKS
1380 _dbus_connection_trace_ref (connection, 0, 1,
"new_for_transport");
1384 if (disconnect_message !=
NULL)
1387 if (disconnect_link !=
NULL)
1390 if (connection !=
NULL)
1400 if (pending_replies)
1409 if (outgoing_counter)
1428 dbus_int32_t old_refcount;
1433 HAVE_LOCK_CHECK (connection);
1436 _dbus_connection_trace_ref (connection, old_refcount, old_refcount + 1,
1451 dbus_int32_t old_refcount;
1453 HAVE_LOCK_CHECK (connection);
1459 _dbus_connection_trace_ref (connection, old_refcount, old_refcount - 1,
1462 if (old_refcount == 1)
1463 _dbus_connection_last_unref (connection);
1466 static dbus_uint32_t
1467 _dbus_connection_get_next_client_serial (
DBusConnection *connection)
1469 dbus_uint32_t serial;
1494 unsigned int condition,
1503 _dbus_verbose (
"start\n");
1507 if (!_dbus_connection_acquire_io_path (connection, 1))
1514 HAVE_LOCK_CHECK (connection);
1518 _dbus_connection_release_io_path (connection);
1520 HAVE_LOCK_CHECK (connection);
1522 _dbus_verbose (
"middle\n");
1524 status = _dbus_connection_get_dispatch_status_unlocked (connection);
1527 _dbus_connection_update_dispatch_status_and_unlock (connection, status);
1529 _dbus_verbose (
"end\n");
1555 shared_connections_shutdown (
void *data)
1573 close_connection_on_shutdown (connection);
1583 shared_connections =
NULL;
1585 if (shared_connections_no_guid !=
NULL)
1589 while (connection !=
NULL)
1592 close_connection_on_shutdown (connection);
1598 shared_connections_no_guid =
NULL;
1607 _dbus_verbose (
"checking for existing connection\n");
1613 if (shared_connections ==
NULL)
1615 _dbus_verbose (
"creating shared_connections hash table\n");
1620 if (shared_connections ==
NULL)
1629 shared_connections =
NULL;
1634 _dbus_verbose (
" successfully created shared_connections\n");
1669 if (_dbus_connection_get_is_connected_unlocked (connection))
1672 *result = connection;
1673 _dbus_verbose (
"looked up existing connection to server guid %s\n",
1678 _dbus_verbose (
"looked up existing connection to server guid %s but it was disconnected so ignoring it\n",
1695 char *guid_in_connection;
1697 HAVE_LOCK_CHECK (connection);
1727 if (guid_key ==
NULL)
1731 if (guid_in_connection ==
NULL)
1741 guid_key, connection))
1751 _dbus_verbose (
"stored connection to %s to be shared\n",
1764 HAVE_LOCK_CHECK (connection);
1773 _dbus_verbose (
"dropping connection to %s out of the shared table\n",
1803 if (transport ==
NULL)
1805 _DBUS_ASSERT_ERROR_IS_SET (error);
1813 if (connection ==
NULL)
1815 _DBUS_SET_OOM (error);
1819 #ifndef DBUS_DISABLE_CHECKS
1838 _dbus_connection_open_internal (
const char *address,
1848 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
1850 _dbus_verbose (
"opening %s connection to: %s\n",
1851 shared ?
"shared" :
"private", address);
1856 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
1860 for (i = 0; i < len; i++)
1864 if (!connection_lookup_shared (entries[i], &connection))
1865 _DBUS_SET_OOM (&tmp_error);
1868 if (connection ==
NULL)
1870 connection = connection_try_from_address_entry (entries[i],
1873 if (connection !=
NULL && shared)
1884 if (!connection_record_shared_unlocked (connection, guid))
1886 _DBUS_SET_OOM (&tmp_error);
1887 _dbus_connection_close_possibly_shared_and_unlock (connection);
1899 _DBUS_ASSERT_ERROR_IS_SET (&tmp_error);
1907 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
1908 _DBUS_ASSERT_ERROR_IS_CLEAR (&tmp_error);
1910 if (connection ==
NULL)
1912 _DBUS_ASSERT_ERROR_IS_SET (&first_error);
1937 _dbus_connection_close_possibly_shared_and_unlock (connection);
1941 _dbus_connection_preallocate_send_unlocked (
DBusConnection *connection)
1945 HAVE_LOCK_CHECK (connection);
1950 if (preallocated ==
NULL)
1965 return preallocated;
1977 _dbus_connection_send_preallocated_unlocked_no_update (
DBusConnection *connection,
1980 dbus_uint32_t *client_serial)
1982 dbus_uint32_t serial;
1994 preallocated =
NULL;
2000 _dbus_verbose (
"Message %p (%s %s %s %s '%s') for %s added to outgoing queue %p, %d pending to send\n",
2021 serial = _dbus_connection_get_next_client_serial (connection);
2024 *client_serial = serial;
2032 _dbus_verbose (
"Message %p serial is %u\n",
2042 DBUS_ITERATION_DO_WRITING,
2047 _dbus_connection_wakeup_mainloop (connection);
2051 _dbus_connection_send_preallocated_and_unlock (
DBusConnection *connection,
2054 dbus_uint32_t *client_serial)
2058 HAVE_LOCK_CHECK (connection);
2060 _dbus_connection_send_preallocated_unlocked_no_update (connection,
2062 message, client_serial);
2064 _dbus_verbose (
"middle\n");
2065 status = _dbus_connection_get_dispatch_status_unlocked (connection);
2068 _dbus_connection_update_dispatch_status_and_unlock (connection, status);
2083 dbus_uint32_t *client_serial)
2090 preallocated = _dbus_connection_preallocate_send_unlocked (connection);
2091 if (preallocated ==
NULL)
2097 _dbus_connection_send_preallocated_and_unlock (connection,
2131 dbus_int32_t refcount;
2140 _dbus_connection_close_possibly_shared_and_unlock (connection);
2156 _dbus_memory_pause_based_on_timeout (
int timeout_milliseconds)
2158 if (timeout_milliseconds == -1)
2160 else if (timeout_milliseconds < 100)
2162 else if (timeout_milliseconds <= 1000)
2169 generate_local_error_message (dbus_uint32_t serial,
2195 if (error_msg !=
NULL)
2218 _dbus_connection_peek_for_reply_unlocked (
DBusConnection *connection,
2219 dbus_uint32_t client_serial)
2222 HAVE_LOCK_CHECK (connection);
2226 while (link !=
NULL)
2232 _dbus_verbose (
"%s reply to %d found in queue\n", _DBUS_FUNCTION_NAME, client_serial);
2246 dbus_uint32_t client_serial)
2250 HAVE_LOCK_CHECK (connection);
2254 while (link !=
NULL)
2271 connection_timeout_and_complete_all_pending_calls_unlocked (
DBusConnection *connection)
2301 HAVE_LOCK_CHECK (connection);
2311 _dbus_connection_detach_pending_call_and_unlock (connection, pending);
2319 check_for_reply_and_update_dispatch_unlocked (
DBusConnection *connection,
2325 reply = check_for_reply_unlocked (connection,
2329 _dbus_verbose (
"checked for reply\n");
2331 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): got reply\n");
2333 complete_pending_call_and_unlock (connection, pending, reply);
2337 status = _dbus_connection_get_dispatch_status_unlocked (connection);
2338 _dbus_connection_update_dispatch_status_and_unlock (connection, status);
2364 long start_tv_sec, start_tv_usec;
2365 long tv_sec, tv_usec;
2368 dbus_uint32_t client_serial;
2370 int timeout_milliseconds, elapsed_milliseconds;
2382 _dbus_connection_flush_unlocked (connection);
2396 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): will block %d milliseconds for reply serial %u from %ld sec %ld usec\n",
2397 timeout_milliseconds,
2399 start_tv_sec, start_tv_usec);
2403 timeout_milliseconds = -1;
2405 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): will block for reply serial %u\n", client_serial);
2410 if (check_for_reply_and_update_dispatch_unlocked (connection, pending))
2417 DBUS_ITERATION_DO_READING |
2418 DBUS_ITERATION_BLOCK,
2419 timeout_milliseconds);
2423 _dbus_verbose (
"top of recheck\n");
2425 HAVE_LOCK_CHECK (connection);
2429 status = _dbus_connection_get_dispatch_status_unlocked (connection);
2436 _dbus_verbose (
"Pending call completed by dispatch\n");
2437 _dbus_connection_update_dispatch_status_and_unlock (connection, status);
2444 if (check_for_reply_and_update_dispatch_unlocked (connection, pending))
2449 elapsed_milliseconds = (tv_sec - start_tv_sec) * 1000 +
2450 (tv_usec - start_tv_usec) / 1000;
2452 if (!_dbus_connection_get_is_connected_unlocked (connection))
2456 error_msg = generate_local_error_message (client_serial,
2458 "Connection was disconnected before a reply was received");
2461 complete_pending_call_and_unlock (connection, pending, error_msg);
2466 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): disconnected\n");
2467 else if (timeout ==
NULL)
2475 _dbus_verbose (
"dbus_connection_send_with_reply_and_block() waiting for more memory\n");
2477 _dbus_memory_pause_based_on_timeout (timeout_milliseconds - elapsed_milliseconds);
2484 DBUS_ITERATION_DO_READING |
2485 DBUS_ITERATION_BLOCK,
2486 timeout_milliseconds - elapsed_milliseconds);
2489 goto recheck_status;
2491 else if (tv_sec < start_tv_sec)
2492 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): clock set backward\n");
2493 else if (elapsed_milliseconds < timeout_milliseconds)
2495 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): %d milliseconds remain\n", timeout_milliseconds - elapsed_milliseconds);
2503 _dbus_verbose (
"dbus_connection_send_with_reply_and_block() waiting for more memory\n");
2505 _dbus_memory_pause_based_on_timeout (timeout_milliseconds - elapsed_milliseconds);
2512 DBUS_ITERATION_DO_READING |
2513 DBUS_ITERATION_BLOCK,
2514 timeout_milliseconds - elapsed_milliseconds);
2517 goto recheck_status;
2520 _dbus_verbose (
"dbus_connection_send_with_reply_and_block(): Waited %d milliseconds and got no reply\n",
2521 elapsed_milliseconds);
2526 complete_pending_call_and_unlock (connection, pending,
NULL);
2530 status = _dbus_connection_get_dispatch_status_unlocked (connection);
2531 _dbus_connection_update_dispatch_status_and_unlock (connection, status);
2555 DBusPendingFdsChangeFunction callback,
2604 _dbus_return_val_if_fail (address !=
NULL,
NULL);
2605 _dbus_return_val_if_error_is_set (error,
NULL);
2607 connection = _dbus_connection_open_internal (address,
2647 _dbus_return_val_if_fail (address !=
NULL,
NULL);
2648 _dbus_return_val_if_error_is_set (error,
NULL);
2650 connection = _dbus_connection_open_internal (address,
2666 dbus_int32_t old_refcount;
2668 _dbus_return_val_if_fail (connection !=
NULL,
NULL);
2671 _dbus_connection_trace_ref (connection, old_refcount, old_refcount + 1,
2678 free_outgoing_message (
void *element,
2697 _dbus_verbose (
"Finalizing connection %p\n", connection);
2723 while (link !=
NULL)
2729 _dbus_message_filter_unref (filter);
2746 free_outgoing_message,
2801 dbus_int32_t old_refcount;
2803 _dbus_return_if_fail (connection !=
NULL);
2808 _dbus_connection_trace_ref (connection, old_refcount, old_refcount - 1,
2811 if (old_refcount == 1)
2813 #ifndef DBUS_DISABLE_CHECKS
2816 _dbus_warn_check_failed (
"The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.\n%s",
2818 "Most likely, the application called unref() too many times and removed a reference belonging to libdbus, since this is a shared connection.\n" :
2819 "Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.\n");
2823 _dbus_connection_last_unref (connection);
2837 _dbus_connection_close_possibly_shared_and_unlock (
DBusConnection *connection)
2841 HAVE_LOCK_CHECK (connection);
2843 _dbus_verbose (
"Disconnecting %p\n", connection);
2862 status = _dbus_connection_get_dispatch_status_unlocked (connection);
2865 _dbus_connection_update_dispatch_status_and_unlock (connection, status);
2916 _dbus_return_if_fail (connection !=
NULL);
2921 #ifndef DBUS_DISABLE_CHECKS
2926 _dbus_warn_check_failed (
"Applications must not close shared connections - see dbus_connection_close() docs. This is a bug in the application.\n");
2931 _dbus_connection_close_possibly_shared_and_unlock (connection);
2935 _dbus_connection_get_is_connected_unlocked (
DBusConnection *connection)
2937 HAVE_LOCK_CHECK (connection);
2959 _dbus_return_val_if_fail (connection !=
NULL,
FALSE);
2962 res = _dbus_connection_get_is_connected_unlocked (connection);
2981 _dbus_return_val_if_fail (connection !=
NULL,
FALSE);
3015 _dbus_return_val_if_fail (connection !=
NULL,
FALSE);
3060 _dbus_return_val_if_fail (connection !=
NULL,
NULL);
3090 _dbus_return_val_if_fail (connection !=
NULL,
FALSE);
3098 #ifdef HAVE_UNIX_FD_PASSING
3130 _dbus_return_if_fail (connection !=
NULL);
3151 _dbus_return_val_if_fail (connection !=
NULL,
NULL);
3156 _dbus_connection_preallocate_send_unlocked (connection);
3160 return preallocated;
3176 _dbus_return_if_fail (connection !=
NULL);
3177 _dbus_return_if_fail (preallocated !=
NULL);
3178 _dbus_return_if_fail (connection == preallocated->
connection);
3202 dbus_uint32_t *client_serial)
3204 _dbus_return_if_fail (connection !=
NULL);
3205 _dbus_return_if_fail (preallocated !=
NULL);
3206 _dbus_return_if_fail (message !=
NULL);
3207 _dbus_return_if_fail (preallocated->
connection == connection);
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)
3216 #ifdef HAVE_UNIX_FD_PASSING
3219 message->n_unix_fds > 0)
3230 _dbus_connection_send_preallocated_and_unlock (connection,
3232 message, client_serial);
3236 _dbus_connection_send_unlocked_no_update (
DBusConnection *connection,
3238 dbus_uint32_t *client_serial)