Lines Matching full:message
2 /* dispatch.c Message dispatcher
54 DBusMessage *message, in send_one_message() argument
62 message, in send_one_message()
66 if (dbus_message_contains_unix_fds(message) && in send_one_message()
72 message)) in send_one_message()
85 DBusMessage *message, in bus_dispatch_matches() argument
102 _dbus_assert (dbus_message_get_sender (message) != NULL); in bus_dispatch_matches()
106 /* First, send the message to the addressed_recipient, if there is one. */ in bus_dispatch_matches()
112 message, error)) in bus_dispatch_matches()
115 if (dbus_message_contains_unix_fds (message) && in bus_dispatch_matches()
121 "Tried to send message with Unix file descriptors" in bus_dispatch_matches()
126 /* Dispatch the message */ in bus_dispatch_matches()
127 if (!bus_transaction_send (transaction, addressed_recipient, message)) in bus_dispatch_matches()
134 /* Now dispatch to others who look interested in this message */ in bus_dispatch_matches()
141 sender, addressed_recipient, message, in bus_dispatch_matches()
156 message, transaction, &tmp_error)) in bus_dispatch_matches()
175 DBusMessage *message) in bus_dispatch() argument
202 service_name = dbus_message_get_destination (message); in bus_dispatch()
208 interface_name = dbus_message_get_interface (message); in bus_dispatch()
209 member_name = dbus_message_get_member (message); in bus_dispatch()
210 error_name = dbus_message_get_error_name (message); in bus_dispatch()
226 if (dbus_message_is_signal (message, in bus_dispatch()
234 if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL) in bus_dispatch()
252 /* Assign a sender to the message */ in bus_dispatch()
258 if (!dbus_message_set_sender (message, sender)) in bus_dispatch()
269 service_name = dbus_message_get_destination (message); in bus_dispatch()
276 connection, NULL, NULL, message, &error)) in bus_dispatch()
278 _dbus_verbose ("Security policy rejected message\n"); in bus_dispatch()
282 _dbus_verbose ("Giving message to %s\n", DBUS_SERVICE_DBUS); in bus_dispatch()
283 if (!bus_driver_handle_message (connection, transaction, message, &error)) in bus_dispatch()
288 _dbus_verbose ("Received message from non-registered client. Disconnecting.\n"); in bus_dispatch()
305 if (service == NULL && dbus_message_get_auto_start (message)) in bus_dispatch()
310 * message after the service has been created. in bus_dispatch()
315 message, service_name, &error)) in bus_dispatch()
339 /* Now send the message to its destination (or not, if in bus_dispatch()
343 if (!bus_dispatch_matches (transaction, connection, addressed_recipient, message, &error)) in bus_dispatch()
358 bus_connection_send_oom_error (connection, message); in bus_dispatch()
374 &error, message)) in bus_dispatch()
376 bus_connection_send_oom_error (connection, message); in bus_dispatch()
403 DBusMessage *message, in bus_dispatch_message_filter() argument
406 return bus_dispatch (connection, message); in bus_dispatch_message_filter()
436 * sending a message, or whether the initial dbus_connection_send()
500 DBusMessage *message, in warn_unexpected_real() argument
505 if (message) in warn_unexpected_real()
506 …_dbus_warn ("%s:%d received message interface \"%s\" member \"%s\" error name \"%s\" on %p, expect… in warn_unexpected_real()
508 dbus_message_get_interface (message) ? in warn_unexpected_real()
509 dbus_message_get_interface (message) : "(unset)", in warn_unexpected_real()
510 dbus_message_get_member (message) ? in warn_unexpected_real()
511 dbus_message_get_member (message) : "(unset)", in warn_unexpected_real()
512 dbus_message_get_error_name (message) ? in warn_unexpected_real()
513 dbus_message_get_error_name (message) : "(unset)", in warn_unexpected_real()
517 _dbus_warn ("%s:%d received no message on %p, expecting %s\n", in warn_unexpected_real()
521 #define warn_unexpected(connection, message, expected) \ argument
522 warn_unexpected_real (connection, message, expected, _DBUS_FUNCTION_NAME, __LINE__)
526 DBusMessage *message) in verbose_message_received() argument
528 _dbus_verbose ("Received message interface \"%s\" member \"%s\" error name \"%s\" on %p\n", in verbose_message_received()
529 dbus_message_get_interface (message) ? in verbose_message_received()
530 dbus_message_get_interface (message) : "(unset)", in verbose_message_received()
531 dbus_message_get_member (message) ? in verbose_message_received()
532 dbus_message_get_member (message) : "(unset)", in verbose_message_received()
533 dbus_message_get_error_name (message) ? in verbose_message_received()
534 dbus_message_get_error_name (message) : "(unset)", in verbose_message_received()
558 DBusMessage *message; in check_service_owner_changed_foreach() local
569 message = pop_message_waiting_for_memory (connection); in check_service_owner_changed_foreach()
570 if (message == NULL) in check_service_owner_changed_foreach()
572 _dbus_warn ("Did not receive a message on %p, expecting %s\n", in check_service_owner_changed_foreach()
576 else if (!dbus_message_is_signal (message, in check_service_owner_changed_foreach()
580 warn_unexpected (connection, message, "NameOwnerChanged"); in check_service_owner_changed_foreach()
591 dbus_message_get_args (message, &error, in check_service_owner_changed_foreach()
631 _dbus_warn ("inconsistent ServiceOwnedChanged message (\"%s\" [ %s -> %s ])\n", in check_service_owner_changed_foreach()
642 if (message) in check_service_owner_changed_foreach()
643 dbus_message_unref (message); in check_service_owner_changed_foreach()
697 _dbus_assert_not_reached ("stuff left in message queues after disconnecting a client"); in kill_client_connection()
712 _dbus_assert_not_reached ("message other than disconnect dispatched after failure to register"); in kill_client_connection_unchecked()
728 DBusMessage *message; in check_no_messages_foreach() local
730 message = pop_message_waiting_for_memory (connection); in check_no_messages_foreach()
731 if (message != NULL) in check_no_messages_foreach()
733 warn_unexpected (connection, message, "no messages"); in check_no_messages_foreach()
738 if (message) in check_no_messages_foreach()
739 dbus_message_unref (message); in check_no_messages_foreach()
754 _dbus_verbose ("leftover message found\n"); in check_no_leftovers()
768 DBusMessage *message; in check_hello_message() local
780 message = NULL; in check_hello_message()
785 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_hello_message()
790 if (message == NULL) in check_hello_message()
795 if (!dbus_connection_send (connection, message, &serial)) in check_hello_message()
797 dbus_message_unref (message); in check_hello_message()
802 _dbus_assert (dbus_message_has_signature (message, "")); in check_hello_message()
804 dbus_message_unref (message); in check_hello_message()
805 message = NULL; in check_hello_message()
816 /* send our message */ in check_hello_message()
841 message = pop_message_waiting_for_memory (connection); in check_hello_message()
842 if (message == NULL) in check_hello_message()
849 verbose_message_received (connection, message); in check_hello_message()
851 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_hello_message()
853 _dbus_warn ("Message has wrong sender %s\n", in check_hello_message()
854 dbus_message_get_sender (message) ? in check_hello_message()
855 dbus_message_get_sender (message) : "(none)"); in check_hello_message()
859 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_hello_message()
861 if (dbus_message_is_error (message, in check_hello_message()
868 warn_unexpected (connection, message, "not this error"); in check_hello_message()
877 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_hello_message()
883 warn_unexpected (connection, message, "method return for Hello"); in check_hello_message()
889 if (!dbus_message_get_args (message, &error, in check_hello_message()
923 name_message = message; in check_hello_message()
926 message = pop_message_waiting_for_memory (connection); in check_hello_message()
927 if (message == NULL) in check_hello_message()
933 if (! dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, in check_hello_message()
942 if (!dbus_message_get_args (message, &error, in check_hello_message()
982 if (message) in check_hello_message()
983 dbus_message_unref (message); in check_hello_message()
998 DBusMessage *message; in check_double_hello_message() local
1005 message = NULL; in check_double_hello_message()
1009 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_double_hello_message()
1014 if (message == NULL) in check_double_hello_message()
1017 if (!dbus_connection_send (connection, message, &serial)) in check_double_hello_message()
1019 dbus_message_unref (message); in check_double_hello_message()
1023 dbus_message_unref (message); in check_double_hello_message()
1024 message = NULL; in check_double_hello_message()
1026 /* send our message */ in check_double_hello_message()
1043 message = pop_message_waiting_for_memory (connection); in check_double_hello_message()
1044 if (message == NULL) in check_double_hello_message()
1051 verbose_message_received (connection, message); in check_double_hello_message()
1053 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_double_hello_message()
1055 _dbus_warn ("Message has wrong sender %s\n", in check_double_hello_message()
1056 dbus_message_get_sender (message) ? in check_double_hello_message()
1057 dbus_message_get_sender (message) : "(none)"); in check_double_hello_message()
1061 if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_ERROR) in check_double_hello_message()
1063 warn_unexpected (connection, message, "method return for Hello"); in check_double_hello_message()
1075 if (message) in check_double_hello_message()
1076 dbus_message_unref (message); in check_double_hello_message()
1088 DBusMessage *message; in check_get_connection_unix_user() local
1097 message = NULL; in check_get_connection_unix_user()
1101 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_get_connection_unix_user()
1106 if (message == NULL) in check_get_connection_unix_user()
1111 if (!dbus_message_append_args (message, in check_get_connection_unix_user()
1115 dbus_message_unref (message); in check_get_connection_unix_user()
1119 if (!dbus_connection_send (connection, message, &serial)) in check_get_connection_unix_user()
1121 dbus_message_unref (message); in check_get_connection_unix_user()
1125 /* send our message */ in check_get_connection_unix_user()
1128 dbus_message_unref (message); in check_get_connection_unix_user()
1129 message = NULL; in check_get_connection_unix_user()
1145 message = pop_message_waiting_for_memory (connection); in check_get_connection_unix_user()
1146 if (message == NULL) in check_get_connection_unix_user()
1153 verbose_message_received (connection, message); in check_get_connection_unix_user()
1155 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_get_connection_unix_user()
1157 if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) in check_get_connection_unix_user()
1163 warn_unexpected (connection, message, "not this error"); in check_get_connection_unix_user()
1170 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_get_connection_unix_user()
1176 warn_unexpected (connection, message, in check_get_connection_unix_user()
1184 if (!dbus_message_get_args (message, &error, in check_get_connection_unix_user()
1212 if (message) in check_get_connection_unix_user()
1213 dbus_message_unref (message); in check_get_connection_unix_user()
1225 DBusMessage *message; in check_get_connection_unix_process_id() local
1234 message = NULL; in check_get_connection_unix_process_id()
1238 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_get_connection_unix_process_id()
1243 if (message == NULL) in check_get_connection_unix_process_id()
1248 if (!dbus_message_append_args (message, in check_get_connection_unix_process_id()
1252 dbus_message_unref (message); in check_get_connection_unix_process_id()
1256 if (!dbus_connection_send (connection, message, &serial)) in check_get_connection_unix_process_id()
1258 dbus_message_unref (message); in check_get_connection_unix_process_id()
1262 /* send our message */ in check_get_connection_unix_process_id()
1265 dbus_message_unref (message); in check_get_connection_unix_process_id()
1266 message = NULL; in check_get_connection_unix_process_id()
1282 message = pop_message_waiting_for_memory (connection); in check_get_connection_unix_process_id()
1283 if (message == NULL) in check_get_connection_unix_process_id()
1290 verbose_message_received (connection, message); in check_get_connection_unix_process_id()
1292 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_get_connection_unix_process_id()
1294 if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) in check_get_connection_unix_process_id()
1299 else if (dbus_message_is_error (message, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN)) in check_get_connection_unix_process_id()
1309 warn_unexpected (connection, message, "not this error"); in check_get_connection_unix_process_id()
1317 warn_unexpected (connection, message, "GetConnectionUnixProcessID to fail on Windows"); in check_get_connection_unix_process_id()
1320 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_get_connection_unix_process_id()
1326 warn_unexpected (connection, message, in check_get_connection_unix_process_id()
1334 if (!dbus_message_get_args (message, &error, in check_get_connection_unix_process_id()
1379 if (message) in check_get_connection_unix_process_id()
1380 dbus_message_unref (message); in check_get_connection_unix_process_id()
1392 DBusMessage *message; in check_add_match_all() local
1400 message = NULL; in check_add_match_all()
1404 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_add_match_all()
1409 if (message == NULL) in check_add_match_all()
1413 if (!dbus_message_append_args (message, DBUS_TYPE_STRING, &empty, in check_add_match_all()
1416 dbus_message_unref (message); in check_add_match_all()
1420 if (!dbus_connection_send (connection, message, &serial)) in check_add_match_all()
1422 dbus_message_unref (message); in check_add_match_all()
1426 dbus_message_unref (message); in check_add_match_all()
1427 message = NULL; in check_add_match_all()
1431 /* send our message */ in check_add_match_all()
1456 message = pop_message_waiting_for_memory (connection); in check_add_match_all()
1457 if (message == NULL) in check_add_match_all()
1464 verbose_message_received (connection, message); in check_add_match_all()
1466 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_add_match_all()
1468 _dbus_warn ("Message has wrong sender %s\n", in check_add_match_all()
1469 dbus_message_get_sender (message) ? in check_add_match_all()
1470 dbus_message_get_sender (message) : "(none)"); in check_add_match_all()
1474 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_add_match_all()
1476 if (dbus_message_is_error (message, in check_add_match_all()
1483 warn_unexpected (connection, message, "not this error"); in check_add_match_all()
1490 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_add_match_all()
1493 _dbus_assert (dbus_message_get_reply_serial (message) == serial); in check_add_match_all()
1497 warn_unexpected (connection, message, "method return for AddMatch"); in check_add_match_all()
1511 if (message) in check_add_match_all()
1512 dbus_message_unref (message); in check_add_match_all()
1575 DBusMessage *message; in check_nonexistent_service_no_auto_start() local
1581 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_nonexistent_service_no_auto_start()
1586 if (message == NULL) in check_nonexistent_service_no_auto_start()
1589 dbus_message_set_auto_start (message, FALSE); in check_nonexistent_service_no_auto_start()
1592 if (!dbus_message_append_args (message, in check_nonexistent_service_no_auto_start()
1597 dbus_message_unref (message); in check_nonexistent_service_no_auto_start()
1601 if (!dbus_connection_send (connection, message, &serial)) in check_nonexistent_service_no_auto_start()
1603 dbus_message_unref (message); in check_nonexistent_service_no_auto_start()
1607 dbus_message_unref (message); in check_nonexistent_service_no_auto_start()
1608 message = NULL; in check_nonexistent_service_no_auto_start()
1622 message = pop_message_waiting_for_memory (connection); in check_nonexistent_service_no_auto_start()
1623 if (message == NULL) in check_nonexistent_service_no_auto_start()
1630 verbose_message_received (connection, message); in check_nonexistent_service_no_auto_start()
1632 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_nonexistent_service_no_auto_start()
1634 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_nonexistent_service_no_auto_start()
1636 _dbus_warn ("Message has wrong sender %s\n", in check_nonexistent_service_no_auto_start()
1637 dbus_message_get_sender (message) ? in check_nonexistent_service_no_auto_start()
1638 dbus_message_get_sender (message) : "(none)"); in check_nonexistent_service_no_auto_start()
1642 if (dbus_message_is_error (message, in check_nonexistent_service_no_auto_start()
1647 else if (dbus_message_is_error (message, in check_nonexistent_service_no_auto_start()
1654 warn_unexpected (connection, message, "not this error"); in check_nonexistent_service_no_auto_start()
1668 if (message) in check_nonexistent_service_no_auto_start()
1669 dbus_message_unref (message); in check_nonexistent_service_no_auto_start()
1681 DBusMessage *message; in check_nonexistent_service_auto_start() local
1685 message = dbus_message_new_method_call (NONEXISTENT_SERVICE_NAME, in check_nonexistent_service_auto_start()
1690 if (message == NULL) in check_nonexistent_service_auto_start()
1693 if (!dbus_connection_send (connection, message, &serial)) in check_nonexistent_service_auto_start()
1695 dbus_message_unref (message); in check_nonexistent_service_auto_start()
1699 dbus_message_unref (message); in check_nonexistent_service_auto_start()
1700 message = NULL; in check_nonexistent_service_auto_start()
1714 message = pop_message_waiting_for_memory (connection); in check_nonexistent_service_auto_start()
1716 if (message == NULL) in check_nonexistent_service_auto_start()
1719 "Echo message (auto activation)", serial, connection); in check_nonexistent_service_auto_start()
1723 verbose_message_received (connection, message); in check_nonexistent_service_auto_start()
1725 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_nonexistent_service_auto_start()
1727 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_nonexistent_service_auto_start()
1729 _dbus_warn ("Message has wrong sender %s\n", in check_nonexistent_service_auto_start()
1730 dbus_message_get_sender (message) ? in check_nonexistent_service_auto_start()
1731 dbus_message_get_sender (message) : "(none)"); in check_nonexistent_service_auto_start()
1735 if (dbus_message_is_error (message, in check_nonexistent_service_auto_start()
1740 else if (dbus_message_is_error (message, in check_nonexistent_service_auto_start()
1747 warn_unexpected (connection, message, "not this error"); in check_nonexistent_service_auto_start()
1761 if (message) in check_nonexistent_service_auto_start()
1762 dbus_message_unref (message); in check_nonexistent_service_auto_start()
1773 DBusMessage *message; in check_base_service_activated() local
1785 message = initial_message; in check_base_service_activated()
1786 dbus_message_ref (message); in check_base_service_activated()
1788 if (dbus_message_is_signal (message, in check_base_service_activated()
1799 if (!dbus_message_get_args (message, &error, in check_base_service_activated()
1813 _dbus_warn ("Message %s doesn't have a service name: %s\n", in check_base_service_activated()
1815 error.message); in check_base_service_activated()
1853 warn_unexpected (connection, message, "NameOwnerChanged (creation) for base service"); in check_base_service_activated()
1864 if (message) in check_base_service_activated()
1865 dbus_message_unref (message); in check_base_service_activated()
1878 DBusMessage *message; in check_service_activated() local
1887 message = initial_message; in check_service_activated()
1888 dbus_message_ref (message); in check_service_activated()
1890 if (dbus_message_is_signal (message, in check_service_activated()
1902 if (!dbus_message_get_args (message, &error, in check_service_activated()
1916 _dbus_warn ("Message %s doesn't have a service name: %s\n", in check_service_activated()
1918 error.message); in check_service_activated()
1955 dbus_message_unref (message); in check_service_activated()
1960 message = pop_message_waiting_for_memory (connection); in check_service_activated()
1961 if (message == NULL) in check_service_activated()
1970 warn_unexpected (connection, message, "NameOwnerChanged for the activated name"); in check_service_activated()
1975 if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_service_activated()
1977 warn_unexpected (connection, message, "reply to StartServiceByName"); in check_service_activated()
1983 if (!dbus_message_get_args (message, &error, in check_service_activated()
1990 "StartServiceByName", error.message); in check_service_activated()
2010 dbus_message_unref (message); in check_service_activated()
2011 message = NULL; in check_service_activated()
2022 if (message) in check_service_activated()
2023 dbus_message_unref (message); in check_service_activated()
2036 DBusMessage *message; in check_service_auto_activated() local
2044 message = initial_message; in check_service_auto_activated()
2045 dbus_message_ref (message); in check_service_auto_activated()
2047 if (dbus_message_is_signal (message, in check_service_auto_activated()
2055 if (!dbus_message_get_args (message, &error, in check_service_auto_activated()
2067 _dbus_warn ("Message %s doesn't have a service name: %s\n", in check_service_auto_activated()
2069 error.message); in check_service_auto_activated()
2096 dbus_message_unref (message); in check_service_auto_activated()
2097 message = NULL; in check_service_auto_activated()
2102 warn_unexpected (connection, message, "NameOwnerChanged for the activated name"); in check_service_auto_activated()
2110 if (message) in check_service_auto_activated()
2111 dbus_message_unref (message); in check_service_auto_activated()
2164 DBusMessage *message; in check_send_exit_to_service() local
2168 _dbus_verbose ("Sending exit message to the test service\n"); in check_send_exit_to_service()
2172 /* Kill off the test service by sending it a quit message */ in check_send_exit_to_service()
2173 message = dbus_message_new_method_call (service_name, in check_send_exit_to_service()
2178 if (message == NULL) in check_send_exit_to_service()
2188 if (!dbus_connection_send (connection, message, &serial)) in check_send_exit_to_service()
2190 dbus_message_unref (message); in check_send_exit_to_service()
2200 dbus_message_unref (message); in check_send_exit_to_service()
2201 message = NULL; in check_send_exit_to_service()
2203 /* send message */ in check_send_exit_to_service()
2209 /* see if we got an error during message bus dispatching */ in check_send_exit_to_service()
2211 message = borrow_message_waiting_for_memory (connection); in check_send_exit_to_service()
2212 got_error = message != NULL && dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR; in check_send_exit_to_service()
2213 if (message) in check_send_exit_to_service()
2215 dbus_connection_return_message (connection, message); in check_send_exit_to_service()
2216 message = NULL; in check_send_exit_to_service()
2229 message = pop_message_waiting_for_memory (connection); in check_send_exit_to_service()
2230 _dbus_assert (message != NULL); in check_send_exit_to_service()
2232 if (dbus_message_get_reply_serial (message) != serial) in check_send_exit_to_service()
2234 warn_unexpected (connection, message, in check_send_exit_to_service()
2239 if (!dbus_message_is_error (message, in check_send_exit_to_service()
2242 warn_unexpected (connection, message, in check_send_exit_to_service()
2248 dbus_message_get_error_name (message)); in check_send_exit_to_service()
2265 message = pop_message_waiting_for_memory (connection); in check_send_exit_to_service()
2267 if (message == NULL) in check_send_exit_to_service()
2273 if (!dbus_message_is_error (message, in check_send_exit_to_service()
2276 warn_unexpected (connection, message, in check_send_exit_to_service()
2281 if (dbus_message_get_reply_serial (message) != serial) in check_send_exit_to_service()
2283 warn_unexpected (connection, message, in check_send_exit_to_service()
2289 dbus_message_get_error_name (message)); in check_send_exit_to_service()
2302 if (message) in check_send_exit_to_service()
2303 dbus_message_unref (message); in check_send_exit_to_service()
2314 DBusMessage *message; in check_got_error() local
2322 message = pop_message_waiting_for_memory (connection); in check_got_error()
2323 if (message == NULL) in check_got_error()
2329 if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_ERROR) in check_got_error()
2331 warn_unexpected (connection, message, "an error"); in check_got_error()
2342 if (dbus_message_is_error (message, error_name)) in check_got_error()
2355 dbus_message_get_error_name (message)); in check_got_error()
2362 if (message) in check_got_error()
2363 dbus_message_unref (message); in check_got_error()
2377 check_got_service_info (DBusMessage *message) in check_got_service_info() argument
2381 if (dbus_message_is_signal (message, in check_got_service_info()
2394 dbus_message_get_args (message, &error, in check_got_service_info()
2408 _dbus_warn ("unexpected arguments for NameOwnerChanged message\n"); in check_got_service_info()
2421 else if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_got_service_info()
2438 DBusMessage *message; in check_existent_service_no_auto_start() local
2448 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_existent_service_no_auto_start()
2453 if (message == NULL) in check_existent_service_no_auto_start()
2456 dbus_message_set_auto_start (message, FALSE); in check_existent_service_no_auto_start()
2459 if (!dbus_message_append_args (message, in check_existent_service_no_auto_start()
2464 dbus_message_unref (message); in check_existent_service_no_auto_start()
2468 if (!dbus_connection_send (connection, message, &serial)) in check_existent_service_no_auto_start()
2470 dbus_message_unref (message); in check_existent_service_no_auto_start()
2474 dbus_message_unref (message); in check_existent_service_no_auto_start()
2475 message = NULL; in check_existent_service_no_auto_start()
2479 /* now wait for the message bus to hear back from the activated in check_existent_service_no_auto_start()
2494 message = pop_message_waiting_for_memory (connection); in check_existent_service_no_auto_start()
2495 if (message == NULL) in check_existent_service_no_auto_start()
2502 verbose_message_received (connection, message); in check_existent_service_no_auto_start()
2505 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_existent_service_no_auto_start()
2507 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_existent_service_no_auto_start()
2509 _dbus_warn ("Message has wrong sender %s\n", in check_existent_service_no_auto_start()
2510 dbus_message_get_sender (message) ? in check_existent_service_no_auto_start()
2511 dbus_message_get_sender (message) : "(none)"); in check_existent_service_no_auto_start()
2515 if (dbus_message_is_error (message, in check_existent_service_no_auto_start()
2520 else if (dbus_message_is_error (message, in check_existent_service_no_auto_start()
2522 dbus_message_is_error (message, in check_existent_service_no_auto_start()
2524 dbus_message_is_error (message, in check_existent_service_no_auto_start()
2532 dbus_message_get_error_name (message)); in check_existent_service_no_auto_start()
2541 message, &base_service)) in check_existent_service_no_auto_start()
2544 base_service_message = message; in check_existent_service_no_auto_start()
2545 message = NULL; in check_existent_service_no_auto_start()
2550 message = dbus_connection_borrow_message (connection); in check_existent_service_no_auto_start()
2551 if (message == NULL) in check_existent_service_no_auto_start()
2557 message_kind = check_got_service_info (message); in check_existent_service_no_auto_start()
2559 dbus_connection_return_message (connection, message); in check_existent_service_no_auto_start()
2560 message = NULL; in check_existent_service_no_auto_start()
2565 _dbus_warn ("Unexpected message after ActivateService " in check_existent_service_no_auto_start()
2619 message = pop_message_waiting_for_memory (connection); in check_existent_service_no_auto_start()
2620 if (message == NULL) in check_existent_service_no_auto_start()
2622 _dbus_warn ("Failed to pop message we just put back! " in check_existent_service_no_auto_start()
2628 base_service, message)) in check_existent_service_no_auto_start()
2631 dbus_message_unref (message); in check_existent_service_no_auto_start()
2632 message = NULL; in check_existent_service_no_auto_start()
2651 if (message) in check_existent_service_no_auto_start()
2652 dbus_message_unref (message); in check_existent_service_no_auto_start()
2668 DBusMessage *message; in check_segfault_service_no_auto_start() local
2674 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_segfault_service_no_auto_start()
2679 if (message == NULL) in check_segfault_service_no_auto_start()
2682 dbus_message_set_auto_start (message, FALSE); in check_segfault_service_no_auto_start()
2686 if (!dbus_message_append_args (message, in check_segfault_service_no_auto_start()
2691 dbus_message_unref (message); in check_segfault_service_no_auto_start()
2695 if (!dbus_connection_send (connection, message, &serial)) in check_segfault_service_no_auto_start()
2697 dbus_message_unref (message); in check_segfault_service_no_auto_start()
2701 dbus_message_unref (message); in check_segfault_service_no_auto_start()
2702 message = NULL; in check_segfault_service_no_auto_start()
2716 message = pop_message_waiting_for_memory (connection); in check_segfault_service_no_auto_start()
2717 if (message == NULL) in check_segfault_service_no_auto_start()
2724 verbose_message_received (connection, message); in check_segfault_service_no_auto_start()
2726 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_segfault_service_no_auto_start()
2728 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_segfault_service_no_auto_start()
2730 _dbus_warn ("Message has wrong sender %s\n", in check_segfault_service_no_auto_start()
2731 dbus_message_get_sender (message) ? in check_segfault_service_no_auto_start()
2732 dbus_message_get_sender (message) : "(none)"); in check_segfault_service_no_auto_start()
2736 if (dbus_message_is_error (message, in check_segfault_service_no_auto_start()
2741 else if (dbus_message_is_error (message, in check_segfault_service_no_auto_start()
2749 else if (dbus_message_is_error (message, in check_segfault_service_no_auto_start()
2756 warn_unexpected (connection, message, "not this error"); in check_segfault_service_no_auto_start()
2770 if (message) in check_segfault_service_no_auto_start()
2771 dbus_message_unref (message); in check_segfault_service_no_auto_start()
2784 DBusMessage *message; in check_segfault_service_auto_start() local
2788 message = dbus_message_new_method_call ("org.freedesktop.DBus.TestSuiteSegfaultService", in check_segfault_service_auto_start()
2793 if (message == NULL) in check_segfault_service_auto_start()
2796 if (!dbus_connection_send (connection, message, &serial)) in check_segfault_service_auto_start()
2798 dbus_message_unref (message); in check_segfault_service_auto_start()
2802 dbus_message_unref (message); in check_segfault_service_auto_start()
2803 message = NULL; in check_segfault_service_auto_start()
2817 message = pop_message_waiting_for_memory (connection); in check_segfault_service_auto_start()
2818 if (message == NULL) in check_segfault_service_auto_start()
2821 "Echo message (auto activation)", serial, connection); in check_segfault_service_auto_start()
2825 verbose_message_received (connection, message); in check_segfault_service_auto_start()
2827 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_segfault_service_auto_start()
2829 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_segfault_service_auto_start()
2831 _dbus_warn ("Message has wrong sender %s\n", in check_segfault_service_auto_start()
2832 dbus_message_get_sender (message) ? in check_segfault_service_auto_start()
2833 dbus_message_get_sender (message) : "(none)"); in check_segfault_service_auto_start()
2837 if (dbus_message_is_error (message, in check_segfault_service_auto_start()
2842 else if (dbus_message_is_error (message, in check_segfault_service_auto_start()
2849 warn_unexpected (connection, message, "not this error"); in check_segfault_service_auto_start()
2863 if (message) in check_segfault_service_auto_start()
2864 dbus_message_unref (message); in check_segfault_service_auto_start()
2870 #define TEST_ECHO_MESSAGE "Test echo message"
2871 #define TEST_RUN_HELLO_FROM_SELF_MESSAGE "Test sending message to self"
2880 DBusMessage *message; in check_existent_hello_from_self() local
2884 message = dbus_message_new_method_call (EXISTENT_SERVICE_NAME, in check_existent_hello_from_self()
2889 if (message == NULL) in check_existent_hello_from_self()
2893 if (!dbus_message_append_args (message, in check_existent_hello_from_self()
2897 dbus_message_unref (message); in check_existent_hello_from_self()
2901 if (!dbus_connection_send (connection, message, &serial)) in check_existent_hello_from_self()
2903 dbus_message_unref (message); in check_existent_hello_from_self()
2907 dbus_message_unref (message); in check_existent_hello_from_self()
2908 message = NULL; in check_existent_hello_from_self()
2917 message = pop_message_waiting_for_memory (connection); in check_existent_hello_from_self()
2918 if (message == NULL) in check_existent_hello_from_self()
2920 _dbus_warn ("Failed to pop message! Should have been reply from RunHelloFromSelf message\n"); in check_existent_hello_from_self()
2924 if (dbus_message_get_reply_serial (message) != serial) in check_existent_hello_from_self()
2927 dbus_message_unref (message); in check_existent_hello_from_self()
2931 dbus_message_unref (message); in check_existent_hello_from_self()
2932 message = NULL; in check_existent_hello_from_self()
2944 DBusMessage *message; in check_existent_ping() local
2946 message = dbus_message_new_method_call (EXISTENT_SERVICE_NAME, in check_existent_ping()
2951 if (message == NULL) in check_existent_ping()
2954 if (!dbus_connection_send (connection, message, &serial)) in check_existent_ping()
2956 dbus_message_unref (message); in check_existent_ping()
2960 dbus_message_unref (message); in check_existent_ping()
2961 message = NULL; in check_existent_ping()
2970 message = pop_message_waiting_for_memory (connection); in check_existent_ping()
2971 if (message == NULL) in check_existent_ping()
2973 _dbus_warn ("Failed to pop message! Should have been reply from Ping message\n"); in check_existent_ping()
2977 if (dbus_message_get_reply_serial (message) != serial) in check_existent_ping()
2980 dbus_message_unref (message); in check_existent_ping()
2984 if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_existent_ping()
2986 _dbus_warn ("Unexpected message return during Ping\n"); in check_existent_ping()
2987 dbus_message_unref (message); in check_existent_ping()
2991 dbus_message_unref (message); in check_existent_ping()
2992 message = NULL; in check_existent_ping()
3004 DBusMessage *message; in check_existent_get_machine_id() local
3008 message = dbus_message_new_method_call (EXISTENT_SERVICE_NAME, in check_existent_get_machine_id()
3013 if (message == NULL) in check_existent_get_machine_id()
3016 if (!dbus_connection_send (connection, message, &serial)) in check_existent_get_machine_id()
3018 dbus_message_unref (message); in check_existent_get_machine_id()
3022 dbus_message_unref (message); in check_existent_get_machine_id()
3023 message = NULL; in check_existent_get_machine_id()
3032 message = pop_message_waiting_for_memory (connection); in check_existent_get_machine_id()
3033 if (message == NULL) in check_existent_get_machine_id()
3035 _dbus_warn ("Failed to pop message! Should have been reply from GetMachineId message\n"); in check_existent_get_machine_id()
3039 if (dbus_message_get_reply_serial (message) != serial) in check_existent_get_machine_id()
3042 dbus_message_unref (message); in check_existent_get_machine_id()
3046 if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_existent_get_machine_id()
3048 _dbus_warn ("Unexpected message return during GetMachineId\n"); in check_existent_get_machine_id()
3049 dbus_message_unref (message); in check_existent_get_machine_id()
3054 if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &machine_id, DBUS_TYPE_INVALID)) in check_existent_get_machine_id()
3057 dbus_message_unref (message); in check_existent_get_machine_id()
3064 dbus_message_unref (message); in check_existent_get_machine_id()
3072 dbus_message_unref (message); in check_existent_get_machine_id()
3073 message = NULL; in check_existent_get_machine_id()
3085 DBusMessage *message; in check_existent_service_auto_start() local
3094 message = dbus_message_new_method_call (EXISTENT_SERVICE_NAME, in check_existent_service_auto_start()
3099 if (message == NULL) in check_existent_service_auto_start()
3103 if (!dbus_message_append_args (message, in check_existent_service_auto_start()
3107 dbus_message_unref (message); in check_existent_service_auto_start()
3111 if (!dbus_connection_send (connection, message, &serial)) in check_existent_service_auto_start()
3113 dbus_message_unref (message); in check_existent_service_auto_start()
3117 dbus_message_unref (message); in check_existent_service_auto_start()
3118 message = NULL; in check_existent_service_auto_start()
3122 /* now wait for the message bus to hear back from the activated in check_existent_service_auto_start()
3136 message = pop_message_waiting_for_memory (connection); in check_existent_service_auto_start()
3137 if (message == NULL) in check_existent_service_auto_start()
3144 verbose_message_received (connection, message); in check_existent_service_auto_start()
3148 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL) in check_existent_service_auto_start()
3153 message, &base_service)) in check_existent_service_auto_start()
3156 base_service_message = message; in check_existent_service_auto_start()
3157 message = NULL; in check_existent_service_auto_start()
3165 message = dbus_connection_borrow_message (connection); in check_existent_service_auto_start()
3166 if (message == NULL) in check_existent_service_auto_start()
3168 _dbus_warn ("No message after auto activation " in check_existent_service_auto_start()
3170 dbus_connection_return_message (connection, message); in check_existent_service_auto_start()
3171 message = NULL; in check_existent_service_auto_start()
3175 message_kind = check_got_service_info (message); in check_existent_service_auto_start()
3177 dbus_connection_return_message (connection, message); in check_existent_service_auto_start()
3178 message = NULL; in check_existent_service_auto_start()
3183 message = pop_message_waiting_for_memory (connection); in check_existent_service_auto_start()
3184 if (message == NULL) in check_existent_service_auto_start()
3186 _dbus_warn ("Failed to pop message we just put back! " in check_existent_service_auto_start()
3193 base_service, message)) in check_existent_service_auto_start()
3196 dbus_message_unref (message); in check_existent_service_auto_start()
3197 message = NULL; in check_existent_service_auto_start()
3223 _dbus_warn ("Unexpected message after auto activation\n"); in check_existent_service_auto_start()
3235 …block_connection_until_message_from_bus (context, connection, "reply from echo message after auto-… in check_existent_service_auto_start()
3237 message = pop_message_waiting_for_memory (connection); in check_existent_service_auto_start()
3238 if (message == NULL) in check_existent_service_auto_start()
3240 _dbus_warn ("Failed to pop message! Should have been reply from echo message\n"); in check_existent_service_auto_start()
3244 if (dbus_message_get_reply_serial (message) != serial) in check_existent_service_auto_start()
3250 dbus_message_unref (message); in check_existent_service_auto_start()
3251 message = NULL; in check_existent_service_auto_start()
3270 if (message) in check_existent_service_auto_start()
3271 dbus_message_unref (message); in check_existent_service_auto_start()
3288 DBusMessage *message; in check_launch_service_file_missing() local
3292 message = dbus_message_new_method_call (SERVICE_FILE_MISSING_NAME, in check_launch_service_file_missing()
3297 if (message == NULL) in check_launch_service_file_missing()
3300 if (!dbus_connection_send (connection, message, &serial)) in check_launch_service_file_missing()
3302 dbus_message_unref (message); in check_launch_service_file_missing()
3306 dbus_message_unref (message); in check_launch_service_file_missing()
3307 message = NULL; in check_launch_service_file_missing()
3321 message = pop_message_waiting_for_memory (connection); in check_launch_service_file_missing()
3322 if (message == NULL) in check_launch_service_file_missing()
3325 "Echo message (auto activation)", serial, connection); in check_launch_service_file_missing()
3329 verbose_message_received (connection, message); in check_launch_service_file_missing()
3331 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_launch_service_file_missing()
3333 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_launch_service_file_missing()
3335 _dbus_warn ("Message has wrong sender %s\n", in check_launch_service_file_missing()
3336 dbus_message_get_sender (message) ? in check_launch_service_file_missing()
3337 dbus_message_get_sender (message) : "(none)"); in check_launch_service_file_missing()
3341 if (dbus_message_is_error (message, in check_launch_service_file_missing()
3346 else if (dbus_message_is_error (message, in check_launch_service_file_missing()
3354 warn_unexpected (connection, message, "not this error"); in check_launch_service_file_missing()
3368 if (message) in check_launch_service_file_missing()
3369 dbus_message_unref (message); in check_launch_service_file_missing()
3383 DBusMessage *message; in check_launch_service_user_missing() local
3387 message = dbus_message_new_method_call (SERVICE_USER_MISSING_NAME, in check_launch_service_user_missing()
3392 if (message == NULL) in check_launch_service_user_missing()
3395 if (!dbus_connection_send (connection, message, &serial)) in check_launch_service_user_missing()
3397 dbus_message_unref (message); in check_launch_service_user_missing()
3401 dbus_message_unref (message); in check_launch_service_user_missing()
3402 message = NULL; in check_launch_service_user_missing()
3417 message = pop_message_waiting_for_memory (connection); in check_launch_service_user_missing()
3418 if (message == NULL) in check_launch_service_user_missing()
3421 "Echo message (auto activation)", serial, connection); in check_launch_service_user_missing()
3425 verbose_message_received (connection, message); in check_launch_service_user_missing()
3427 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_launch_service_user_missing()
3429 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_launch_service_user_missing()
3431 _dbus_warn ("Message has wrong sender %s\n", in check_launch_service_user_missing()
3432 dbus_message_get_sender (message) ? in check_launch_service_user_missing()
3433 dbus_message_get_sender (message) : "(none)"); in check_launch_service_user_missing()
3437 if (dbus_message_is_error (message, in check_launch_service_user_missing()
3442 else if (dbus_message_is_error (message, in check_launch_service_user_missing()
3450 warn_unexpected (connection, message, "not this error"); in check_launch_service_user_missing()
3464 if (message) in check_launch_service_user_missing()
3465 dbus_message_unref (message); in check_launch_service_user_missing()
3479 DBusMessage *message; in check_launch_service_exec_missing() local
3483 message = dbus_message_new_method_call (SERVICE_EXEC_MISSING_NAME, in check_launch_service_exec_missing()
3488 if (message == NULL) in check_launch_service_exec_missing()
3491 if (!dbus_connection_send (connection, message, &serial)) in check_launch_service_exec_missing()
3493 dbus_message_unref (message); in check_launch_service_exec_missing()
3497 dbus_message_unref (message); in check_launch_service_exec_missing()
3498 message = NULL; in check_launch_service_exec_missing()
3513 message = pop_message_waiting_for_memory (connection); in check_launch_service_exec_missing()
3514 if (message == NULL) in check_launch_service_exec_missing()
3517 "Echo message (auto activation)", serial, connection); in check_launch_service_exec_missing()
3521 verbose_message_received (connection, message); in check_launch_service_exec_missing()
3523 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_launch_service_exec_missing()
3525 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_launch_service_exec_missing()
3527 _dbus_warn ("Message has wrong sender %s\n", in check_launch_service_exec_missing()
3528 dbus_message_get_sender (message) ? in check_launch_service_exec_missing()
3529 dbus_message_get_sender (message) : "(none)"); in check_launch_service_exec_missing()
3533 if (dbus_message_is_error (message, in check_launch_service_exec_missing()
3538 else if (dbus_message_is_error (message, in check_launch_service_exec_missing()
3545 else if (dbus_message_is_error (message, in check_launch_service_exec_missing()
3549 ; /* good, this is allowed, and is the message passed back from the in check_launch_service_exec_missing()
3554 warn_unexpected (connection, message, "not this error"); in check_launch_service_exec_missing()
3568 if (message) in check_launch_service_exec_missing()
3569 dbus_message_unref (message); in check_launch_service_exec_missing()
3583 DBusMessage *message; in check_launch_service_service_missing() local
3587 message = dbus_message_new_method_call (SERVICE_SERVICE_MISSING_NAME, in check_launch_service_service_missing()
3592 if (message == NULL) in check_launch_service_service_missing()
3595 if (!dbus_connection_send (connection, message, &serial)) in check_launch_service_service_missing()
3597 dbus_message_unref (message); in check_launch_service_service_missing()
3601 dbus_message_unref (message); in check_launch_service_service_missing()
3602 message = NULL; in check_launch_service_service_missing()
3617 message = pop_message_waiting_for_memory (connection); in check_launch_service_service_missing()
3618 if (message == NULL) in check_launch_service_service_missing()
3621 "Echo message (auto activation)", serial, connection); in check_launch_service_service_missing()
3625 verbose_message_received (connection, message); in check_launch_service_service_missing()
3627 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_launch_service_service_missing()
3629 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_launch_service_service_missing()
3631 _dbus_warn ("Message has wrong sender %s\n", in check_launch_service_service_missing()
3632 dbus_message_get_sender (message) ? in check_launch_service_service_missing()
3633 dbus_message_get_sender (message) : "(none)"); in check_launch_service_service_missing()
3637 if (dbus_message_is_error (message, in check_launch_service_service_missing()
3642 else if (dbus_message_is_error (message, in check_launch_service_service_missing()
3649 else if (dbus_message_is_error (message, in check_launch_service_service_missing()
3653 ; /* good, this is allowed, and is the message passed back from the in check_launch_service_service_missing()
3658 warn_unexpected (connection, message, "not this error"); in check_launch_service_service_missing()
3672 if (message) in check_launch_service_service_missing()
3673 dbus_message_unref (message); in check_launch_service_service_missing()
3687 DBusMessage *message; in check_shell_fail_service_auto_start() local
3691 message = dbus_message_new_method_call (SHELL_FAIL_SERVICE_NAME, in check_shell_fail_service_auto_start()
3696 if (message == NULL) in check_shell_fail_service_auto_start()
3699 if (!dbus_connection_send (connection, message, &serial)) in check_shell_fail_service_auto_start()
3701 dbus_message_unref (message); in check_shell_fail_service_auto_start()
3705 dbus_message_unref (message); in check_shell_fail_service_auto_start()
3706 message = NULL; in check_shell_fail_service_auto_start()
3720 message = pop_message_waiting_for_memory (connection); in check_shell_fail_service_auto_start()
3721 if (message == NULL) in check_shell_fail_service_auto_start()
3724 "Echo message (auto activation)", serial, connection); in check_shell_fail_service_auto_start()
3728 verbose_message_received (connection, message); in check_shell_fail_service_auto_start()
3730 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_shell_fail_service_auto_start()
3732 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_shell_fail_service_auto_start()
3734 _dbus_warn ("Message has wrong sender %s\n", in check_shell_fail_service_auto_start()
3735 dbus_message_get_sender (message) ? in check_shell_fail_service_auto_start()
3736 dbus_message_get_sender (message) : "(none)"); in check_shell_fail_service_auto_start()
3740 if (dbus_message_is_error (message, in check_shell_fail_service_auto_start()
3745 else if (dbus_message_is_error (message, in check_shell_fail_service_auto_start()
3753 warn_unexpected (connection, message, "not this error"); in check_shell_fail_service_auto_start()
3767 if (message) in check_shell_fail_service_auto_start()
3768 dbus_message_unref (message); in check_shell_fail_service_auto_start()
3782 DBusMessage *message; in check_shell_service_success_auto_start() local
3791 message = dbus_message_new_method_call (SHELL_SUCCESS_SERVICE_NAME, in check_shell_service_success_auto_start()
3796 if (message == NULL) in check_shell_service_success_auto_start()
3799 if (!dbus_connection_send (connection, message, &serial)) in check_shell_service_success_auto_start()
3801 dbus_message_unref (message); in check_shell_service_success_auto_start()
3805 dbus_message_unref (message); in check_shell_service_success_auto_start()
3806 message = NULL; in check_shell_service_success_auto_start()
3810 /* now wait for the message bus to hear back from the activated in check_shell_service_success_auto_start()
3824 message = pop_message_waiting_for_memory (connection); in check_shell_service_success_auto_start()
3825 if (message == NULL) in check_shell_service_success_auto_start()
3832 verbose_message_received (connection, message); in check_shell_service_success_auto_start()
3836 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL) in check_shell_service_success_auto_start()
3841 message, &base_service)) in check_shell_service_success_auto_start()
3844 base_service_message = message; in check_shell_service_success_auto_start()
3845 message = NULL; in check_shell_service_success_auto_start()
3853 message = dbus_connection_borrow_message (connection); in check_shell_service_success_auto_start()
3854 if (message == NULL) in check_shell_service_success_auto_start()
3856 _dbus_warn ("No message after auto activation " in check_shell_service_success_auto_start()
3858 dbus_connection_return_message (connection, message); in check_shell_service_success_auto_start()
3859 message = NULL; in check_shell_service_success_auto_start()
3863 message_kind = check_got_service_info (message); in check_shell_service_success_auto_start()
3865 dbus_connection_return_message (connection, message); in check_shell_service_success_auto_start()
3866 message = NULL; in check_shell_service_success_auto_start()
3871 message = pop_message_waiting_for_memory (connection); in check_shell_service_success_auto_start()
3872 if (message == NULL) in check_shell_service_success_auto_start()
3874 _dbus_warn ("Failed to pop message we just put back! " in check_shell_service_success_auto_start()
3881 base_service, message)) in check_shell_service_success_auto_start()
3884 dbus_message_unref (message); in check_shell_service_success_auto_start()
3885 message = NULL; in check_shell_service_success_auto_start()
3911 _dbus_warn ("Unexpected message after auto activation\n"); in check_shell_service_success_auto_start()
3923 …block_connection_until_message_from_bus (context, connection, "reply from echo message after auto-… in check_shell_service_success_auto_start()
3925 message = pop_message_waiting_for_memory (connection); in check_shell_service_success_auto_start()
3926 if (message == NULL) in check_shell_service_success_auto_start()
3928 _dbus_warn ("Failed to pop message! Should have been reply from echo message\n"); in check_shell_service_success_auto_start()
3932 if (dbus_message_get_reply_serial (message) != serial) in check_shell_service_success_auto_start()
3938 if (!dbus_message_get_args (message, NULL, in check_shell_service_success_auto_start()
3997 dbus_message_unref (message); in check_shell_service_success_auto_start()
3998 message = NULL; in check_shell_service_success_auto_start()
4008 if (message) in check_shell_service_success_auto_start()
4009 dbus_message_unref (message); in check_shell_service_success_auto_start()
4062 DBusMessage *message; in check_get_services() local
4071 message = NULL; in check_get_services()
4073 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_get_services()
4078 if (message == NULL) in check_get_services()
4081 if (!dbus_connection_send (connection, message, &serial)) in check_get_services()
4083 dbus_message_unref (message); in check_get_services()
4087 /* send our message */ in check_get_services()
4090 dbus_message_unref (message); in check_get_services()
4091 message = NULL; in check_get_services()
4107 message = pop_message_waiting_for_memory (connection); in check_get_services()
4108 if (message == NULL) in check_get_services()
4115 verbose_message_received (connection, message); in check_get_services()
4117 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_get_services()
4119 if (dbus_message_is_error (message, DBUS_ERROR_NO_MEMORY)) in check_get_services()
4125 warn_unexpected (connection, message, "not this error"); in check_get_services()
4132 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_METHOD_RETURN) in check_get_services()
4138 warn_unexpected (connection, message, in check_get_services()
4146 if (!dbus_message_get_args (message, &error, in check_get_services()
4179 if (message) in check_get_services()
4180 dbus_message_unref (message); in check_get_services()
4192 DBusMessage *message; in check_list_services() local
4220 message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, in check_list_services()
4225 if (message == NULL) in check_list_services()
4228 dbus_message_set_auto_start (message, FALSE); in check_list_services()
4231 if (!dbus_message_append_args (message, in check_list_services()
4236 dbus_message_unref (message); in check_list_services()
4240 if (!dbus_connection_send (connection, message, &serial)) in check_list_services()
4242 dbus_message_unref (message); in check_list_services()
4246 dbus_message_unref (message); in check_list_services()
4247 message = NULL; in check_list_services()
4251 /* now wait for the message bus to hear back from the activated in check_list_services()
4266 message = pop_message_waiting_for_memory (connection); in check_list_services()
4267 if (message == NULL) in check_list_services()
4274 verbose_message_received (connection, message); in check_list_services()
4277 if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR) in check_list_services()
4279 if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS)) in check_list_services()
4281 _dbus_warn ("Message has wrong sender %s\n", in check_list_services()
4282 dbus_message_get_sender (message) ? in check_list_services()
4283 dbus_message_get_sender (message) : "(none)"); in check_list_services()
4287 if (dbus_message_is_error (message, in check_list_services()
4292 else if (dbus_message_is_error (message, in check_list_services()
4294 dbus_message_is_error (message, in check_list_services()
4296 dbus_message_is_error (message, in check_list_services()
4304 dbus_message_get_error_name (message)); in check_list_services()
4313 message, &base_service)) in check_list_services()
4316 base_service_message = message; in check_list_services()
4317 message = NULL; in check_list_services()
4322 message = dbus_connection_borrow_message (connection); in check_list_services()
4323 if (message == NULL) in check_list_services()
4329 message_kind = check_got_service_info (message); in check_list_services()
4331 dbus_connection_return_message (connection, message); in check_list_services()
4332 message = NULL; in check_list_services()
4339 _dbus_warn ("Unexpected message after ActivateService " in check_list_services()
4344 message = pop_message_waiting_for_memory (connection); in check_list_services()
4345 if (message == NULL) in check_list_services()
4347 _dbus_warn ("Failed to pop message we just put back! " in check_list_services()
4353 base_service, message)) in check_list_services()
4356 dbus_message_unref (message); in check_list_services()
4357 message = NULL; in check_list_services()
4389 if (message) in check_list_services()
4390 dbus_message_unref (message); in check_list_services()
4507 _dbus_assert_not_reached ("hello message failed"); in bus_dispatch_test_conf()
4510 _dbus_assert_not_reached ("double hello message failed"); in bus_dispatch_test_conf()
4513 _dbus_assert_not_reached ("AddMatch message failed"); in bus_dispatch_test_conf()
4525 _dbus_assert_not_reached ("hello message failed"); in bus_dispatch_test_conf()
4528 _dbus_assert_not_reached ("AddMatch message failed"); in bus_dispatch_test_conf()
4540 _dbus_assert_not_reached ("hello message failed"); in bus_dispatch_test_conf()
4543 _dbus_assert_not_reached ("AddMatch message failed"); in bus_dispatch_test_conf()
4546 _dbus_warn("TODO: testing of GetConnectionUnixUser message skipped for now\n"); in bus_dispatch_test_conf()
4547 _dbus_warn("TODO: testing of GetConnectionUnixProcessID message skipped for now\n"); in bus_dispatch_test_conf()
4550 _dbus_assert_not_reached ("GetConnectionUnixUser message failed"); in bus_dispatch_test_conf()
4553 _dbus_assert_not_reached ("GetConnectionUnixProcessID message failed"); in bus_dispatch_test_conf()
4557 _dbus_assert_not_reached ("ListActivatableNames message failed"); in bus_dispatch_test_conf()
4656 _dbus_assert_not_reached ("hello message failed"); in bus_dispatch_test_conf_fail()
4659 _dbus_assert_not_reached ("double hello message failed"); in bus_dispatch_test_conf_fail()
4662 _dbus_assert_not_reached ("AddMatch message failed"); in bus_dispatch_test_conf_fail()
4739 _dbus_assert_not_reached ("hello message failed"); in bus_dispatch_sha1_test()
4742 _dbus_assert_not_reached ("addmatch message failed"); in bus_dispatch_sha1_test()
4788 _dbus_assert_not_reached ("hello message failed"); in bus_unix_fds_passing_test()
4791 _dbus_assert_not_reached ("AddMatch message failed"); in bus_unix_fds_passing_test()
4803 _dbus_assert_not_reached ("hello message failed"); in bus_unix_fds_passing_test()
4806 _dbus_assert_not_reached ("AddMatch message failed"); in bus_unix_fds_passing_test()
4809 _dbus_assert_not_reached ("could not alloc message"); in bus_unix_fds_passing_test()
4850 _dbus_assert_not_reached("bogus message received"); in bus_unix_fds_passing_test()
4860 _dbus_assert_not_reached("bogus message received"); in bus_unix_fds_passing_test()