diff options
author | Magnus Henoch <mange@freemail.hu> | 2004-03-26 13:38:06 +0000 |
---|---|---|
committer | Kirill A. Korinskiy <catap@catap.ru> | 2004-03-26 13:38:06 +0000 |
commit | 5ab678d173e3fd207d4f6d6e482a4f58386c6324 (patch) | |
tree | d6240a01b5a98587439e1a5d74fec49c584998bb /jabber-iq.el | |
parent | 84c7041496f946aef555a5df143fb9e3f65b29ed (diff) |
Remove processed entries from *jabber-open-info-queries*.
Diffstat (limited to 'jabber-iq.el')
-rw-r--r-- | jabber-iq.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/jabber-iq.el b/jabber-iq.el index 855a4a7..1b8de34 100644 --- a/jabber-iq.el +++ b/jabber-iq.el @@ -1,5 +1,5 @@ ;; jabber-iq.el - infoquery functions -;; $Id: jabber-iq.el,v 1.6 2004/03/21 14:08:39 legoscia Exp $ +;; $Id: jabber-iq.el,v 1.7 2004/03/26 13:38:06 legoscia Exp $ ;; Copyright (C) 2002, 2003, 2004 - tom berger - object@intelectronica.net ;; Copyright (C) 2003, 2004 - Magnus Henoch - mange@freemail.hu @@ -50,17 +50,16 @@ (type (jabber-xml-get-attribute xml-data 'type)) (from (jabber-xml-get-attribute xml-data 'from)) (query (jabber-iq-query xml-data)) - (callback (cdr (assoc id *jabber-open-info-queries*)))) + (callback (assoc id *jabber-open-info-queries*))) (cond ;; if type is "result" or "error", this is a response to a query we sent. - ((string= type "result") - (let ((callback-cons (nth 0 callback))) + ((or (string= type "result") + (string= type "error")) + (let ((callback-cons (nth (cdr (assoc type '(("result" . 0) + ("error" . 1)))) (cdr callback)))) (if (consp callback-cons) - (funcall (car callback-cons) xml-data (cdr callback-cons))))) - ((string= type "error") - (let ((callback-cons (nth 1 callback))) - (if (consp callback-cons) - (funcall (car callback-cons) xml-data (cdr callback-cons))))) + (funcall (car callback-cons) xml-data (cdr callback-cons)))) + (setq *jabber-open-info-queries* (delq callback *jabber-open-info-queries*))) ;; if type is "get" or "set", correct action depends on namespace of request. ((and (listp query) |