From 5f7393917c474ea5e448485f6eccde085627158d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Wed, 16 Sep 2009 18:31:27 +0200 Subject: [PATCH] D-Bus: Fix return statement in error handling of async server methods --- codegen/valadbusservermodule.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codegen/valadbusservermodule.vala b/codegen/valadbusservermodule.vala index c2295a4b..582cfe80 100644 --- a/codegen/valadbusservermodule.vala +++ b/codegen/valadbusservermodule.vala @@ -347,11 +347,12 @@ internal class Vala.DBusServerModule : DBusClientModule { generate_server_error_cases (error_block, m.get_error_types (), new CCodeIdentifier ("error"), new CCodeIdentifier ("message"), new CCodeIdentifier ("reply")); send_reply (error_block); - error_block.add_statement (new CCodeReturnStatement (new CCodeIdentifier ("DBUS_HANDLER_RESULT_HANDLED"))); if (m.coroutine) { + error_block.add_statement (new CCodeReturnStatement ()); ready_block.add_statement (new CCodeIfStatement (new CCodeIdentifier ("error"), error_block)); } else { + error_block.add_statement (new CCodeReturnStatement (new CCodeIdentifier ("DBUS_HANDLER_RESULT_HANDLED"))); block.add_statement (new CCodeIfStatement (new CCodeIdentifier ("error"), error_block)); } } -- 2.11.4.GIT