From 23b9b3bd7aa18be0e5335482aefbc68edfe09aab Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 17 Jun 2011 12:15:20 +0100 Subject: [PATCH 2/5] dbus_g_proxy_call: simplify error handling now that call_id may be 0 There's no need to special-case it any more - we can just use dbus_g_proxy_end_call_internal and rely on it to cope. This reverts the fix for fd.o #12675, since the commit before this one is more general. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38406 --- dbus/dbus-gproxy.c | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c index ea0c311..3bb4257 100644 --- a/dbus/dbus-gproxy.c +++ b/dbus/dbus-gproxy.c @@ -2692,18 +2692,9 @@ dbus_g_proxy_call (DBusGProxy *proxy, g_value_array_free (in_args); - if (call_id > 0) - { - first_arg_type = va_arg (args, GType); - ret = dbus_g_proxy_end_call_internal (proxy, call_id, error, first_arg_type, args); - } - else - { - g_set_error (error, DBUS_GERROR, - DBUS_GERROR_FAILED, - "Disconnection or out-of-memory"); - ret = FALSE; - } + first_arg_type = va_arg (args, GType); + ret = dbus_g_proxy_end_call_internal (proxy, call_id, error, first_arg_type, + args); va_end (args); -- 1.7.5.4