Function: dbus-handle-bus-disconnect
dbus-handle-bus-disconnect is a byte-compiled function defined in
dbus.el.gz.
Signature
(dbus-handle-bus-disconnect)
Documentation
React to a bus disconnection.
BUS is the bus that disconnected. This routine unregisters all handlers on the given bus and causes all synchronous calls pending at the time of disconnect to fail.
Source Code
;; Defined in /usr/src/emacs/lisp/net/dbus.el.gz
(defun dbus-handle-bus-disconnect ()
"React to a bus disconnection.
BUS is the bus that disconnected. This routine unregisters all
handlers on the given bus and causes all synchronous calls
pending at the time of disconnect to fail."
(let ((bus (dbus-event-bus-name last-input-event))
keys-to-remove)
(maphash
(lambda (key value)
(when (and (eq (nth 0 key) :serial)
(eq (nth 1 key) bus))
(run-hook-with-args
'dbus-event-error-functions
(list 'dbus-event
bus
dbus-message-type-error
(nth 2 key) ; serial
nil ; service
nil ; destination
nil ; path
nil ; interface
nil ; member
value) ; handler
(list 'dbus-error dbus-error-disconnected "Bus disconnected" bus))
(push key keys-to-remove)))
dbus-registered-objects-table)
(dolist (key keys-to-remove)
(remhash key dbus-registered-objects-table))))