summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2010-10-25 13:46:21 +0200
committerMichael Albinus <michael.albinus@gmx.de>2010-10-25 13:46:21 +0200
commit655441b28ae5dd95c4a889a92a9be0f9cab2cf0d (patch)
treee61f3858b79287a3bdb43e4d2c757216b0ade5ed
parent23c261f58fceed14e04b3ba928007fde9567d8e2 (diff)
* dbusbind.c (Fdbus_call_method_asynchronously)
(Fdbus_register_signal, Fdbus_register_method): Check, whether `dbus-registered-objects-table' is initialized. Must not be synchronized with the trunk.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/dbusbind.c12
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 98d6e0b1ca..cf2ae75fc8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-25 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (Fdbus_call_method_asynchronously)
+ (Fdbus_register_signal, Fdbus_register_method): Check, whether
+ `dbus-registered-objects-table' is initialized.
+
2010-10-24 Chong Yidong <cyd@stupidchicken.com>
* xterm.c (x_connection_closed): Kill Emacs unconditionally.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 60697c8a4e..37bfbf4bad 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1175,6 +1175,10 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
SDATA (interface),
SDATA (method));
+ /* Check dbus-registered-objects-table. */
+ if (!HASH_TABLE_P (Vdbus_registered_objects_table))
+ XD_SIGNAL1 (build_string ("dbus.el is not loaded"));
+
/* Open a connection to the bus. */
connection = xd_initialize (bus);
@@ -1863,6 +1867,10 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG
wrong_type_argument (intern ("functionp"), handler);
GCPRO6 (bus, service, path, interface, signal, handler);
+ /* Check dbus-registered-objects-table. */
+ if (!HASH_TABLE_P (Vdbus_registered_objects_table))
+ XD_SIGNAL1 (build_string ("dbus.el is not loaded"));
+
/* Retrieve unique name of service. If service is a known name, we
will register for the corresponding unique name, if any. Signals
are sent always with the unique name as sender. Note: the unique
@@ -1976,6 +1984,10 @@ used for composing the returning D-Bus message. */)
/* TODO: We must check for a valid service name, otherwise there is
a segmentation fault. */
+ /* Check dbus-registered-objects-table. */
+ if (!HASH_TABLE_P (Vdbus_registered_objects_table))
+ XD_SIGNAL1 (build_string ("dbus.el is not loaded"));
+
/* Open a connection to the bus. */
connection = xd_initialize (bus);