diff options
author | Mike Gorse <mgorse@novell.com> | 2010-12-04 05:14:44 -0500 |
---|---|---|
committer | Mike Gorse <mgorse@novell.com> | 2010-12-04 05:14:44 -0500 |
commit | 2d4f51d63495b01797ba237a98c016bf2a0a9a1b (patch) | |
tree | bb48c141c23b94af92013aa1d0a25f46fa8904cc /dbind | |
parent | 3221e4d296e89888bade934a545d05b353b88526 (diff) | |
download | at-spi2-core-2d4f51d63495b01797ba237a98c016bf2a0a9a1b.tar.gz |
Use peer-to-peer connections when available
Diffstat (limited to 'dbind')
-rw-r--r-- | dbind/dbind.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dbind/dbind.c b/dbind/dbind.c index b090e069..fcf76ddf 100644 --- a/dbind/dbind.c +++ b/dbind/dbind.c @@ -34,15 +34,18 @@ dbind_send_and_allow_reentry (DBusConnection * bus, DBusMessage * message, DBusE { DBusPendingCall *pending; SpiReentrantCallClosure closure; + const char *unique_name = dbus_bus_get_unique_name (bus); - if (strcmp (dbus_message_get_destination (message), - dbus_bus_get_unique_name (bus)) != 0) + if (unique_name && + strcmp (dbus_message_get_destination (message), unique_name) != 0) return dbus_connection_send_with_reply_and_block (bus, message, dbind_timeout, error); closure.reply = NULL; dbus_connection_setup_with_g_main(bus, NULL); if (!dbus_connection_send_with_reply (bus, message, &pending, dbind_timeout)) return NULL; + if (!pending) + return NULL; dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL); closure.reply = NULL; |