summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-06-17 12:15:20 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-15 10:45:49 +0100
commit2731a2f7f824f9c1cd11dd14e88ff1e0875f280b (patch)
treec2d0424dc261ba46cddfee26d978857239cca946
parent1b38cecf7bbdb8a99ef13616b8c661dfb0bc060f (diff)
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 Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
-rw-r--r--dbus/dbus-gproxy.c15
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);