[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105921: * net/dbus.el (dbus-unregist
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105921: * net/dbus.el (dbus-unregister-object): Don't release services for |
Date: |
Sun, 25 Sep 2011 17:56:28 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105921
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Sun 2011-09-25 17:56:28 +0200
message:
* net/dbus.el (dbus-unregister-object): Don't release services for
registered signals. (Bug#9581)
modified:
lisp/ChangeLog
lisp/net/dbus.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-09-25 11:52:53 +0000
+++ b/lisp/ChangeLog 2011-09-25 15:56:28 +0000
@@ -1,3 +1,8 @@
+2011-09-25 Michael Albinus <address@hidden>
+
+ * net/dbus.el (dbus-unregister-object): Don't release services for
+ registered signals. (Bug#9581)
+
2011-09-25 Teodor Zlatanov <address@hidden>
* progmodes/cfengine.el (cfengine-auto-mode): Add convenience
=== modified file 'lisp/net/dbus.el'
--- a/lisp/net/dbus.el 2011-09-24 11:45:13 +0000
+++ b/lisp/net/dbus.el 2011-09-25 15:56:28 +0000
@@ -140,11 +140,14 @@
;; Find the corresponding entry in the hash table.
(let* ((key (car object))
- (value (cdr object))
+ (value (cadr object))
+ (bus (car key))
+ (service (car value))
(entry (gethash key dbus-registered-objects-table))
ret)
+ ;; key has the structure (BUS INTERRFACE MEMBER).
+ ;; value has the structure (SERVICE PATH [HANDLER]).
;; entry has the structure ((UNAME SERVICE PATH MEMBER [RULE]) ...).
- ;; value has the structure ((SERVICE PATH [HANDLER]) ...).
;; MEMBER is either a string (the handler), or a cons cell (a
;; property value). UNAME and property values are not taken into
;; account for comparision.
@@ -152,8 +155,8 @@
;; Loop over the registered functions.
(dolist (elt entry)
(when (equal
- (car value)
- (butlast (cdr elt) (- (length (cdr elt)) (length (car value)))))
+ value
+ (butlast (cdr elt) (- (length (cdr elt)) (length value))))
(setq ret t)
;; Compute new hash value. If it is empty, remove it from the
;; hash table.
@@ -162,17 +165,16 @@
;; Remove match rule of signals.
(let ((rule (nth 4 elt)))
(when (stringp rule)
+ (setq service nil) ; We do not need to unregister the service.
(dbus-call-method
- (car key) dbus-service-dbus dbus-path-dbus dbus-interface-dbus
+ bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
"RemoveMatch" rule)))))
;; Check, whether there is still a registered function or property
;; for the given service. If not, unregister the service from the
;; bus.
- (dolist (elt entry)
- (let ((service (cadr elt))
- (bus (car key))
- found)
- (when service
+ (when service
+ (dolist (elt entry)
+ (let (found)
(maphash
(lambda (k v)
(dolist (e v)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105921: * net/dbus.el (dbus-unregister-object): Don't release services for,
Michael Albinus <=