From: Magnus H. <leg...@us...> - 2014-04-25 19:01:08
|
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 0782581252e5d774125cf1d7a68ec27297f84105 (commit) from 177ebecdaf34e5da2bb5e327d6c7281a38d238c7 (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 0782581252e5d774125cf1d7a68ec27297f84105 Author: Magnus Henoch <mag...@gm...> Date: Fri Apr 25 20:00:46 2014 +0100 Handle synchronous errors when connecting asynchronously In jabber-network-connect-async, the call to make-network-process can fail in certain cases without creating a connection and without calling our sentinel function, in particular if DNS resolution fails, and that error case was not updated for the new error reporting solution. This should now work properly. diff --git a/jabber-conn.el b/jabber-conn.el index c91b5f5..0131d45 100644 --- a/jabber-conn.el +++ b/jabber-conn.el @@ -177,7 +177,7 @@ connection fails." (caar remaining-targets) (cdar remaining-targets)) (connect (car remaining-targets) (cdr remaining-targets))) (fsm-send fsm (list :connection-failed (nreverse errors)))))) - (condition-case nil + (condition-case e (make-network-process :name "jabber" :buffer (generate-new-buffer jabber-process-buffer) @@ -198,8 +198,14 @@ connection fails." nil) (t (message "Unknown sentinel status `%s'" status)))))) + (file-error + ;; A file-error has the error message in the third list + ;; element. + (connection-failed nil (car (cddr e)))) (error - (connection-failed nil))))))) + ;; Not sure if we ever get anything but file-errors, + ;; but let's make sure we report them: + (connection-failed nil (error-message-string e)))))))) (message "Connecting to %s:%s..." (caar targets) (cdar targets)) (connect (car targets) (cdr targets))))) ----------------------------------------------------------------------- Summary of changes: jabber-conn.el | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |