diff options
| author | Michael Albinus | 2007-12-16 22:42:47 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-12-16 22:42:47 +0000 |
| commit | 3cc546adf4aeed5891c63b31b42cc515cad16801 (patch) | |
| tree | 5e5fe99c50a9823af71edf75c48b470b90e388a6 | |
| parent | f5306ca30f8b9b4ab8a19eb15a42174ae8a91c20 (diff) | |
| download | emacs-3cc546adf4aeed5891c63b31b42cc515cad16801.tar.gz emacs-3cc546adf4aeed5891c63b31b42cc515cad16801.zip | |
* net/dbus.el (dbus-name-owner-changed-handler): Use
`dbus-unregister-signal' for removing old rules. Obey new
structure of `dbus-registered-functions-table'.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/dbus.el | 20 |
2 files changed, 14 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e172b30ec31..fe01023428f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-12-16 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/dbus.el (dbus-name-owner-changed-handler): Use | ||
| 4 | `dbus-unregister-signal' for removing old rules. Obey new | ||
| 5 | structure of `dbus-registered-functions-table'. | ||
| 6 | |||
| 1 | 2007-12-12 Thien-Thi Nguyen <ttn@gnuvola.org> | 7 | 2007-12-12 Thien-Thi Nguyen <ttn@gnuvola.org> |
| 2 | 8 | ||
| 3 | * progmodes/cc-vars.el (defcustom-c-stylevar): Rewrite. | 9 | * progmodes/cc-vars.el (defcustom-c-stylevar): Rewrite. |
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 83d0f7fa3ec..75bcb8ed138 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -79,21 +79,17 @@ owner of SERVICE, or the empty string if SERVICE looses any name owner." | |||
| 79 | '(lambda (key value) | 79 | '(lambda (key value) |
| 80 | (dolist (elt value) | 80 | (dolist (elt value) |
| 81 | ;; key has the structure (BUS INTERFACE SIGNAL). | 81 | ;; key has the structure (BUS INTERFACE SIGNAL). |
| 82 | ;; elt has the structure (SERVICE UNAME PATH HANDLER). | 82 | ;; elt has the structure (UNAME SERVICE PATH HANDLER). |
| 83 | (when (string-equal old-owner (cadr elt)) | 83 | (when (string-equal old-owner (car elt)) |
| 84 | ;; Remove old key, and add new entry with changed name. | 84 | ;; Remove old key, and add new entry with changed name. |
| 85 | (when dbus-debug (message "Remove rule for %s %s" key elt)) | 85 | (dbus-unregister-signal (list key (cdr elt))) |
| 86 | ;(dbus-unregister-signal key) | ||
| 87 | (setcar (cdr elt) new-owner) | ||
| 88 | (when dbus-debug (message "Add rule for %s %s" key elt)) | ||
| 89 | ;; Maybe we could arrange the lists a little bit better | 86 | ;; Maybe we could arrange the lists a little bit better |
| 90 | ;; that we don't need to extract every single element? | 87 | ;; that we don't need to extract every single element? |
| 91 | (when (not (zerop (length new-owner))) | 88 | (dbus-register-signal |
| 92 | (dbus-register-signal | 89 | ;; BUS SERVICE PATH |
| 93 | ;; BUS SERVICE PATH | 90 | (nth 0 key) (nth 1 elt) (nth 2 elt) |
| 94 | (nth 0 key) (nth 0 elt) (nth 2 elt) | 91 | ;; INTERFACE SIGNAL HANDLER |
| 95 | ;; INTERFACE SIGNAL HANDLER | 92 | (nth 1 key) (nth 2 key) (nth 3 elt))))) |
| 96 | (nth 1 key) (nth 2 key) (nth 3 elt)))))) | ||
| 97 | (copy-hash-table dbus-registered-functions-table))))) | 93 | (copy-hash-table dbus-registered-functions-table))))) |
| 98 | 94 | ||
| 99 | ;; Register the handler. | 95 | ;; Register the handler. |