Commit b39eecb3 authored by Michael Albinus's avatar Michael Albinus
Browse files

Fix Bug#17858

* net/dbus.el (dbus-peer-handler): New defun.
(dbus-register-service): Register it. 
(dbus-managed-objects-handler): Fix docstring.
parent 9d7b0167
2014-07-04 Michael Albinus <michael.albinus@gmx.de>
* net/dbus.el (dbus-peer-handler): New defun.
(dbus-register-service): Register it. (Bug#17858)
(dbus-managed-objects-handler): Fix docstring.
2014-07-04 Phil Sainty <psainty@orcon.net.nz> (tiny change)
 
* emacs-lisp/lisp.el (narrow-to-defun-include-comments): New var.
......@@ -1762,7 +1768,7 @@
Remove HISTFILE and HISTSIZE; it's too late to set them here.
Add :version entry.
(tramp-open-shell): Do not let-bind `tramp-end-of-output'.
Add "HISTSIZE=/dev/null" to the shell's env arguments. Do not send
Add "HISTFILE=/dev/null" to the shell's env arguments. Do not send
extra "PSx=..." commands.
(tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
(Bug#17295)
......@@ -3462,7 +3468,7 @@
2014-03-10 Michael Albinus <michael.albinus@gmx.de>
 
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Do not add `nil' to the environment, when there's no remote `locale'.
Do not add nil to the environment, when there's no remote `locale'.
(tramp-find-inline-encoding): Check, that the remote host has
installed perl, before sending scripts.
 
......
......@@ -544,6 +544,10 @@ placed in the queue.
`:already-owner': Service is already the primary owner."
;; Add Peer handler.
(dbus-register-method
bus service nil dbus-interface-peer "Ping" 'dbus-peer-handler 'dont-register)
;; Add ObjectManager handler.
(dbus-register-method
bus service nil dbus-interface-objectmanager "GetManagedObjects"
......@@ -1151,6 +1155,22 @@ apply
bus service dbus-path-dbus dbus-interface-peer "Ping")))
(dbus-error nil)))
(defun dbus-peer-handler ()
"Default handler for the \"org.freedesktop.DBus.Peer\" interface.
It will be registered for all objects created by `dbus-register-service'."
(let* ((last-input-event last-input-event)
(method (dbus-event-member-name last-input-event)))
(cond
;; "Ping" does not return an output parameter.
((string-equal method "Ping")
:ignore)
;; "GetMachineId" returns "s".
((string-equal method "GetMachineId")
(signal
'dbus-error
(list
(format "%s.GetMachineId not implemented" dbus-interface-peer)))))))
;;; D-Bus introspection.
......@@ -1672,7 +1692,7 @@ and \"org.freedesktop.DBus.Properties.GetAll\", which is slow."
(defun dbus-managed-objects-handler ()
"Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface.
It will be registered for all objects created by `dbus-register-method'."
It will be registered for all objects created by `dbus-register-service'."
(let* ((last-input-event last-input-event)
(bus (dbus-event-bus-name last-input-event))
(path (dbus-event-path-name last-input-event)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment