[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102814: * dbusbind.c (Fdbus_register
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102814: * dbusbind.c (Fdbus_register_service): Raise an error in case of |
Date: |
Mon, 10 Jan 2011 12:28:31 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102814
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2011-01-10 12:28:31 +0100
message:
* dbusbind.c (Fdbus_register_service): Raise an error in case of
unexpected return values.
(Fdbus_register_method): Remove connection initialization.
modified:
src/ChangeLog
src/dbusbind.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-01-10 09:56:17 +0000
+++ b/src/ChangeLog 2011-01-10 11:28:31 +0000
@@ -1,4 +1,10 @@
-2011-01-08 Jan Moringen <address@hidden>
+2011-01-10 Michael Albinus <address@hidden>
+
+ * dbusbind.c (Fdbus_register_service): Raise an error in case of
+ unexpected return values.
+ (Fdbus_register_method): Remove connection initialization.
+
+2011-01-10 Jan Moringen <address@hidden>
* dbusbind.c (QCdbus_request_name_allow_replacement): New symbol;
used by Fdbus_register_service.
=== modified file 'src/dbusbind.c'
--- a/src/dbusbind.c 2011-01-10 09:56:17 +0000
+++ b/src/dbusbind.c 2011-01-10 11:28:31 +0000
@@ -1888,8 +1888,8 @@
=> :primary-owner.
\(dbus-register-service
-:session "org.freedesktop.TextEditor"
-dbus-service-allow-replacement dbus-service-replace-existing)
+ :session "org.freedesktop.TextEditor"
+ dbus-service-allow-replacement dbus-service-replace-existing)
=> :already-owner.
@@ -1939,18 +1939,20 @@
dbus_error_free (&derror);
/* Return object. */
- switch (result) {
- case DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER:
- return QCdbus_request_name_reply_primary_owner;
- case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
- return QCdbus_request_name_reply_in_queue;
- case DBUS_REQUEST_NAME_REPLY_EXISTS:
- return QCdbus_request_name_reply_exists;
- case DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER:
- return QCdbus_request_name_reply_already_owner;
- default:
- return Qnil;
- }
+ switch (result)
+ {
+ case DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER:
+ return QCdbus_request_name_reply_primary_owner;
+ case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
+ return QCdbus_request_name_reply_in_queue;
+ case DBUS_REQUEST_NAME_REPLY_EXISTS:
+ return QCdbus_request_name_reply_exists;
+ case DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER:
+ return QCdbus_request_name_reply_already_owner;
+ default:
+ /* This should not happen. */
+ XD_SIGNAL2 (build_string ("Could not register service"), service);
+ }
}
DEFUN ("dbus-register-signal", Fdbus_register_signal, Sdbus_register_signal,
@@ -2129,8 +2131,6 @@
Lisp_Object dont_register_service)
{
Lisp_Object key, key1, value;
- DBusConnection *connection;
- int result;
DBusError derror;
Lisp_Object args[2] = { bus, service };
@@ -2144,11 +2144,8 @@
/* TODO: We must check for a valid service name, otherwise there is
a segmentation fault. */
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
/* Request the name. */
- if (NILP(dont_register_service))
+ if (NILP (dont_register_service))
Fdbus_register_service (2, args);
/* Create a hash table entry. We use nil for the unique name,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102814: * dbusbind.c (Fdbus_register_service): Raise an error in case of,
Michael Albinus <=