[vala] D-Bus: Fix invalid code generated for error handling in servers



commit f547fae32564b2bdfe788e6fec1ba6a2f7537d05
Author: Jürg Billeter <j bitron ch>
Date:   Sun Sep 13 22:05:49 2009 +0200

    D-Bus: Fix invalid code generated for error handling in servers

 codegen/valadbusservermodule.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valadbusservermodule.vala b/codegen/valadbusservermodule.vala
index a7555a5..d29f27e 100644
--- a/codegen/valadbusservermodule.vala
+++ b/codegen/valadbusservermodule.vala
@@ -328,7 +328,8 @@ internal class Vala.DBusServerModule : DBusClientModule {
 			msgcall.add_argument (new CCodeMemberAccess.pointer (new CCodeIdentifier ("error"), "message"));
 			error_block.add_statement (new CCodeExpressionStatement (new CCodeAssignment (new CCodeIdentifier ("reply"), msgcall)));
 
-			error_block.add_statement (new CCodeReturnStatement (new CCodeIdentifier ("reply")));
+			send_reply (error_block);
+			error_block.add_statement (new CCodeReturnStatement (new CCodeIdentifier ("DBUS_HANDLER_RESULT_HANDLED")));
 
 			block.add_statement (new CCodeIfStatement (new CCodeIdentifier ("error"), error_block));
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]