summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2016-02-29 11:51:45 -0600
committerMike Gorse <mgorse@suse.com>2016-02-29 11:51:45 -0600
commitc22456cf57984cced09bab73119d4df56a870b13 (patch)
treec301a36b54969423016f14305cc3b46087b4be05
parent7a9bd451a495186721af4071b1470fec6fb214dc (diff)
downloadat-spi2-core-c22456cf57984cced09bab73119d4df56a870b13.tar.gz
Don't display warnings when connecting to an app that no longer exists
If an application starts and subsequently exits before we've had time to connect to it, then this at the very least should not trigger a warning.
-rw-r--r--atspi/atspi-misc.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/atspi/atspi-misc.c b/atspi/atspi-misc.c
index 3a1d174f..83d3f969 100644
--- a/atspi/atspi-misc.c
+++ b/atspi/atspi-misc.c
@@ -201,7 +201,8 @@ handle_get_bus_address (DBusPendingCall *pending, void *user_data)
}
else
{
- g_warning ("Unable to open bus connection: %s", error.message);
+ if (!strcmp (error.name, DBUS_ERROR_FILE_NOT_FOUND))
+ g_warning ("Unable to open bus connection: %s", error.message);
dbus_error_free (&error);
}
}
@@ -529,9 +530,16 @@ handle_get_items (DBusPendingCall *pending, void *user_data)
{
const char *sender = dbus_message_get_sender (reply);
const char *error = NULL;
- dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &error,
- DBUS_TYPE_INVALID);
- g_warning ("AT-SPI: Error in GetItems, sender=%s, error=%s", sender, error);
+ if (!strcmp (dbus_message_get_error_name (reply),
+ DBUS_ERROR_SERVICE_UNKNOWN))
+ {
+ }
+ else
+ {
+ dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &error,
+ DBUS_TYPE_INVALID);
+ g_warning ("AT-SPI: Error in GetItems, sender=%s, error=%s", sender, error);
+ }
dbus_message_unref (reply);
dbus_pending_call_unref (pending);
return;