diff options
| author | Michael Albinus | 2010-10-25 13:46:21 +0200 |
|---|---|---|
| committer | Michael Albinus | 2010-10-25 13:46:21 +0200 |
| commit | 655441b28ae5dd95c4a889a92a9be0f9cab2cf0d (patch) | |
| tree | e61f3858b79287a3bdb43e4d2c757216b0ade5ed /src/dbusbind.c | |
| parent | 23c261f58fceed14e04b3ba928007fde9567d8e2 (diff) | |
| download | emacs-655441b28ae5dd95c4a889a92a9be0f9cab2cf0d.tar.gz emacs-655441b28ae5dd95c4a889a92a9be0f9cab2cf0d.zip | |
* 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.
Diffstat (limited to 'src/dbusbind.c')
| -rw-r--r-- | src/dbusbind.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c index 60697c8a4e9..37bfbf4badf 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -1175,6 +1175,10 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE | |||
| 1175 | SDATA (interface), | 1175 | SDATA (interface), |
| 1176 | SDATA (method)); | 1176 | SDATA (method)); |
| 1177 | 1177 | ||
| 1178 | /* Check dbus-registered-objects-table. */ | ||
| 1179 | if (!HASH_TABLE_P (Vdbus_registered_objects_table)) | ||
| 1180 | XD_SIGNAL1 (build_string ("dbus.el is not loaded")); | ||
| 1181 | |||
| 1178 | /* Open a connection to the bus. */ | 1182 | /* Open a connection to the bus. */ |
| 1179 | connection = xd_initialize (bus); | 1183 | connection = xd_initialize (bus); |
| 1180 | 1184 | ||
| @@ -1863,6 +1867,10 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG | |||
| 1863 | wrong_type_argument (intern ("functionp"), handler); | 1867 | wrong_type_argument (intern ("functionp"), handler); |
| 1864 | GCPRO6 (bus, service, path, interface, signal, handler); | 1868 | GCPRO6 (bus, service, path, interface, signal, handler); |
| 1865 | 1869 | ||
| 1870 | /* Check dbus-registered-objects-table. */ | ||
| 1871 | if (!HASH_TABLE_P (Vdbus_registered_objects_table)) | ||
| 1872 | XD_SIGNAL1 (build_string ("dbus.el is not loaded")); | ||
| 1873 | |||
| 1866 | /* Retrieve unique name of service. If service is a known name, we | 1874 | /* Retrieve unique name of service. If service is a known name, we |
| 1867 | will register for the corresponding unique name, if any. Signals | 1875 | will register for the corresponding unique name, if any. Signals |
| 1868 | are sent always with the unique name as sender. Note: the unique | 1876 | are sent always with the unique name as sender. Note: the unique |
| @@ -1976,6 +1984,10 @@ used for composing the returning D-Bus message. */) | |||
| 1976 | /* TODO: We must check for a valid service name, otherwise there is | 1984 | /* TODO: We must check for a valid service name, otherwise there is |
| 1977 | a segmentation fault. */ | 1985 | a segmentation fault. */ |
| 1978 | 1986 | ||
| 1987 | /* Check dbus-registered-objects-table. */ | ||
| 1988 | if (!HASH_TABLE_P (Vdbus_registered_objects_table)) | ||
| 1989 | XD_SIGNAL1 (build_string ("dbus.el is not loaded")); | ||
| 1990 | |||
| 1979 | /* Open a connection to the bus. */ | 1991 | /* Open a connection to the bus. */ |
| 1980 | connection = xd_initialize (bus); | 1992 | connection = xd_initialize (bus); |
| 1981 | 1993 | ||