From: Magnus H. <leg...@us...> - 2014-05-03 21:54:05
|
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 6c85b203ca874e5736d785eac78db05129de2ccc (commit) via 5035b0738480153280d8d3d88a42ab11fa3720c6 (commit) via 00d0567960bcfd18646766ab7178bcd2600d6abf (commit) from 0782581252e5d774125cf1d7a68ec27297f84105 (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 6c85b203ca874e5736d785eac78db05129de2ccc Author: Magnus Henoch <mag...@gm...> Date: Sat May 3 22:52:18 2014 +0100 Fix handling of stream errors This was overlooked when introducing namespace handling: the namespace prefix is no longer part of the element name, and the namespace can be looked up through a fictitious xmlns attribute. diff --git a/jabber-core.el b/jabber-core.el index 85879e0..c75370d 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -995,7 +995,8 @@ submit a bug report, including the information below. "Process an incoming stream error. Return nil if XML-DATA is not a stream:error stanza. Return an fsm result list if it is." - (when (eq (jabber-xml-node-name xml-data) 'stream:error) + (when (and (eq (jabber-xml-node-name xml-data) 'error) + (equal (jabber-xml-get-xmlns xml-data) "http://etherx.jabber.org/streams")) (let ((condition (jabber-stream-error-condition xml-data)) (text (jabber-parse-stream-error xml-data))) (setq state-data (plist-put state-data :disconnection-reason commit 5035b0738480153280d8d3d88a42ab11fa3720c6 Author: Magnus Henoch <mag...@gm...> Date: Sat May 3 22:51:46 2014 +0100 Trim trailing newline from sentinel status messages diff --git a/jabber-core.el b/jabber-core.el index c8ee5cc..85879e0 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -387,13 +387,19 @@ With double prefix argument, specify more connection details." "Handle sentinel event for jabber fsm." ;; We do the same thing for every state, so avoid code duplication. (let* ((string (car (cddr event))) + ;; The event string sometimes (always?) has a trailing + ;; newline, that we don't care for. + (trimmed-string + (if (eq ?\n (aref string (1- (length string)))) + (substring string 0 -1) + string)) (new-state-data ;; If we already know the reason (e.g. a stream error), don't ;; overwrite it. (if (plist-get state-data :disconnection-reason) state-data - (plist-put state-data :disconnection-reason string)))) - (list nil new-state-data))) + (plist-put state-data :disconnection-reason trimmed-string)))) + (list nil new-state-data))) (define-enter-state jabber-connection :connected (fsm state-data) commit 00d0567960bcfd18646766ab7178bcd2600d6abf Author: Magnus Henoch <mag...@gm...> Date: Fri Apr 25 20:01:34 2014 +0100 Fix argument name s/js/jc/. This code happened to work anyway because of dynamic scoping. diff --git a/jabber-iq.el b/jabber-iq.el index 1a94010..2d8b502 100644 --- a/jabber-iq.el +++ b/jabber-iq.el @@ -195,7 +195,7 @@ See section 9.3 of XMPP Core." (dolist (hook '(jabber-info-message-hooks jabber-alert-info-message-hooks)) (run-hook-with-args hook 'browse (current-buffer) (funcall jabber-alert-info-message-function 'browse (current-buffer)))))))) -(defun jabber-silent-process-data (js xml-data closure-data) +(defun jabber-silent-process-data (jc xml-data closure-data) "Process random results from various requests to only alert hooks." (let ((text (cond ((functionp closure-data) ----------------------------------------------------------------------- Summary of changes: jabber-core.el | 13 ++++++++++--- jabber-iq.el | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) hooks/post-receive -- emacs-jabber |