DBusMessage *message;
const char *address;
DBusPendingCall *new_pending;
+ dbus_bool_t result;
if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_METHOD_RETURN)
{
"/org/a11y/atspi/cache",
atspi_interface_cache, "GetItems");
- dbus_connection_send_with_reply (app->bus, message, &new_pending, 2000);
+ result = dbus_connection_send_with_reply (app->bus, message, &new_pending, 2000);
dbus_message_unref (message);
- if (!new_pending)
+ if (!result || !new_pending)
return;
dbus_pending_call_set_notify (new_pending, handle_get_items, app, NULL);
}
char *bus_name_dup;
DBusMessage *message;
DBusPendingCall *pending = NULL;
+ dbus_bool_t result;
if (!app_hash)
{
message = dbus_message_new_method_call (bus_name, atspi_path_root,
atspi_interface_application, "GetApplicationBusAddress");
- dbus_connection_send_with_reply (app->bus, message, &pending, 2000);
+ result = dbus_connection_send_with_reply (app->bus, message, &pending, 2000);
dbus_message_unref (message);
- if (!pending)
+ if (!result || !pending)
{
g_hash_table_remove (app_hash, bus_name_dup);
return NULL;
bus = atspi_get_a11y_bus ();
if (!bus)
return 2;
- dbus_bus_register (bus, NULL);
+ if (!dbus_bus_register (bus, NULL))
+ return 2;
atspi_dbus_connection_setup_with_g_main(bus, g_main_context_default());
dbus_connection_add_filter (bus, atspi_dbus_filter, NULL, NULL);
match = g_strdup_printf ("type='signal',interface='%s',member='AddAccessible'", atspi_interface_cache);