[vala/wip/bug778540: 1/2] Revert "dbus: Move send_message() call before _error label"
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/bug778540: 1/2] Revert "dbus: Move send_message() call before _error label"
- Date: Mon, 6 Mar 2017 10:19:12 +0000 (UTC)
commit 73cde839d92cf4ce1866fa998444b6eb26cfd160
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Mar 6 11:10:12 2017 +0100
Revert "dbus: Move send_message() call before _error label"
This reverts commit b3e04860257be7a7b32b977e215b3b0ca9c78992.
codegen/valagdbusservermodule.vala | 38 ++++++++++++++++++------------------
1 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index 4f06210..e3cbc6e 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -341,25 +341,6 @@ public class Vala.GDBusServerModule : GDBusClientModule {
ccode.add_expression (ccall);
}
- if (!no_reply && (!m.coroutine || ready)) {
- var return_value = new CCodeFunctionCall (new CCodeIdentifier
("g_dbus_connection_send_message"));
- return_value.add_argument (connection);
- return_value.add_argument (new CCodeIdentifier ("_reply_message"));
- return_value.add_argument (new CCodeConstant ("G_DBUS_SEND_MESSAGE_FLAGS_NONE"));
- return_value.add_argument (new CCodeConstant ("NULL"));
- return_value.add_argument (new CCodeConstant ("NULL"));
- ccode.add_expression (return_value);
-
- // free invocation like g_dbus_method_invocation_return_*
- var unref_call = new CCodeFunctionCall (new CCodeIdentifier ("g_object_unref"));
- unref_call.add_argument (new CCodeIdentifier ("invocation"));
- ccode.add_expression (unref_call);
-
- unref_call = new CCodeFunctionCall (new CCodeIdentifier ("g_object_unref"));
- unref_call.add_argument (new CCodeIdentifier ("_reply_message"));
- ccode.add_expression (unref_call);
- }
-
if (need_goto_label) {
ccode.add_label ("_error");
}
@@ -387,6 +368,25 @@ public class Vala.GDBusServerModule : GDBusClientModule {
}
}
+ if (!no_reply && (!m.coroutine || ready)) {
+ var return_value = new CCodeFunctionCall (new CCodeIdentifier
("g_dbus_connection_send_message"));
+ return_value.add_argument (connection);
+ return_value.add_argument (new CCodeIdentifier ("_reply_message"));
+ return_value.add_argument (new CCodeConstant ("G_DBUS_SEND_MESSAGE_FLAGS_NONE"));
+ return_value.add_argument (new CCodeConstant ("NULL"));
+ return_value.add_argument (new CCodeConstant ("NULL"));
+ ccode.add_expression (return_value);
+
+ // free invocation like g_dbus_method_invocation_return_*
+ var unref_call = new CCodeFunctionCall (new CCodeIdentifier ("g_object_unref"));
+ unref_call.add_argument (new CCodeIdentifier ("invocation"));
+ ccode.add_expression (unref_call);
+
+ unref_call = new CCodeFunctionCall (new CCodeIdentifier ("g_object_unref"));
+ unref_call.add_argument (new CCodeIdentifier ("_reply_message"));
+ ccode.add_expression (unref_call);
+ }
+
pop_function ();
cfile.add_function_declaration (function);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]