This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "emacs-jabber".
The branch, master has been updated
via b5cb0d640e7771908d4e772625c79c65c756059e (commit)
from 0118504cf7629bbb2d512b0d38625ffb7dd7be28 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b5cb0d640e7771908d4e772625c79c65c756059e
Author: Magnus Henoch <mag...@gm...>
Date: Tue Nov 12 10:23:57 2013 +0000
Fix error case in jabber-network-connect-async
The `connection-failed' function didn't have access to the variables
`target' and `remaining-targets', since they weren't lexically bound.
diff --git a/jabber-conn.el b/jabber-conn.el
index d03c32d..bdc0cc4 100644
--- a/jabber-conn.el
+++ b/jabber-conn.el
@@ -151,46 +151,47 @@ connection fails."
(labels
((connect
(target remaining-targets)
- (labels ((connection-successful
- (c)
- ;; This mustn't be `fsm-send-sync', because the FSM
- ;; needs to change the sentinel, which cannot be done
- ;; from inside the sentinel.
- (fsm-send fsm (list :connected c)))
- (connection-failed
- (c)
- (message "Couldn't connect to %s:%s" (car target) (cdr target))
- (when c (delete-process c))
- (if remaining-targets
- (progn
- (message
- "Connecting to %s:%s..."
- (caar remaining-targets) (cdar remaining-targets))
- (connect (car remaining-targets) (cdr remaining-targets)))
- (fsm-send fsm :connection-failed))))
- (condition-case nil
- (make-network-process
- :name "jabber"
- :buffer (generate-new-buffer jabber-process-buffer)
- :host (car target) :service (cdr target)
- :coding 'utf-8
- :nowait t
- :sentinel
- (lexical-let ((target target) (remaining-targets remaining-targets))
- (lambda (connection status)
- (cond
- ((string-match "^open" status)
- (connection-successful connection))
- ((string-match "^failed" status)
- (connection-failed connection))
- ((string-match "^deleted" status)
- ;; This happens when we delete a process in the
- ;; "failed" case above.
- nil)
- (t
- (message "Unknown sentinel status `%s'" status))))))
- (error
- (connection-failed nil))))))
+ (lexical-let ((target target) (remaining-targets remaining-targets))
+ (labels ((connection-successful
+ (c)
+ ;; This mustn't be `fsm-send-sync', because the FSM
+ ;; needs to change the sentinel, which cannot be done
+ ;; from inside the sentinel.
+ (fsm-send fsm (list :connected c)))
+ (connection-failed
+ (c)
+ (message "Couldn't connect to %s:%s" (car target) (cdr target))
+ (when c (delete-process c))
+ (if remaining-targets
+ (progn
+ (message
+ "Connecting to %s:%s..."
+ (caar remaining-targets) (cdar remaining-targets))
+ (connect (car remaining-targets) (cdr remaining-targets)))
+ (fsm-send fsm :connection-failed))))
+ (condition-case nil
+ (make-network-process
+ :name "jabber"
+ :buffer (generate-new-buffer jabber-process-buffer)
+ :host (car target) :service (cdr target)
+ :coding 'utf-8
+ :nowait t
+ :sentinel
+ (lexical-let ((target target) (remaining-targets remaining-targets))
+ (lambda (connection status)
+ (cond
+ ((string-match "^open" status)
+ (connection-successful connection))
+ ((string-match "^failed" status)
+ (connection-failed connection))
+ ((string-match "^deleted" status)
+ ;; This happens when we delete a process in the
+ ;; "failed" case above.
+ nil)
+ (t
+ (message "Unknown sentinel status `%s'" status))))))
+ (error
+ (connection-failed nil)))))))
(message "Connecting to %s:%s..." (caar targets) (cdar targets))
(connect (car targets) (cdr targets)))))
-----------------------------------------------------------------------
Summary of changes:
jabber-conn.el | 81 ++++++++++++++++++++++++++++---------------------------
1 files changed, 41 insertions(+), 40 deletions(-)
hooks/post-receive
--
emacs-jabber
|