[vala] D-Bus: Report error on invalid use of register_object in GDBus servers
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] D-Bus: Report error on invalid use of register_object in GDBus servers
- Date: Wed, 20 Oct 2010 21:51:20 +0000 (UTC)
commit a16ef28ff82dfff791abd03915531977c48e77b9
Author: Jürg Billeter <j bitron ch>
Date: Wed Oct 20 23:43:25 2010 +0200
D-Bus: Report error on invalid use of register_object in GDBus servers
codegen/valagdbusservermodule.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index ae4fc26..4ba4eeb 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -962,6 +962,11 @@ public class Vala.GDBusServerModule : GDBusClientModule {
var ma = (MemberAccess) expr.call;
var type_arg = (ObjectType) ma.get_type_arguments ().get (0);
+ if (get_dbus_name (type_arg.type_symbol) == null) {
+ Report.error (expr.source_reference, "DBusConnection.register_object requires type argument with [DBus (name = ...)] attribute");
+ return;
+ }
+
var args = expr.get_argument_list ();
var path_arg = args[0];
var obj_arg = args[1];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]