jabber-newdisco: Don't leave stray nulls in attribute lists

While jabber-sexp2xml has no problems with them, xml-print (used by
jabber-console) doesn't like them.  This causes truncated stanzas in
the XML log and error messages like these:

Couldn't write XML log: Wrong type argument: char-or-string-p, nil
This commit is contained in:
Magnus Henoch 2013-02-09 12:28:43 +00:00
parent ec3b2ee6be
commit 523f5265a2
1 changed files with 10 additions and 10 deletions

View File

@ -49,7 +49,7 @@ invalidate cache and get fresh data."
(jabber-send-iq jc jid
"get"
`(query ((xmlns . "http://jabber.org/protocol/disco#info")
,(when node `(node . ,node))))
,@(when node `((node . ,node)))))
#'jabber-disco-got-info (cons callback closure-data)
(lambda (jc xml-data callback-data)
(when (car callback-data)
@ -104,7 +104,7 @@ invalidate cache and get fresh data."
(jabber-send-iq jc jid
"get"
`(query ((xmlns . "http://jabber.org/protocol/disco#items")
,(when node `(node . ,node))))
,@(when node `((node . ,node)))))
#'jabber-disco-got-items (cons callback closure-data)
(lambda (jc xml-data callback-data)
(when (car callback-data)
@ -137,13 +137,13 @@ invalidate cache and get fresh data."
(jabber-send-iq jc nil
"set"
`(query ((xmlns . "http://jabber.org/protocol/disco#items")
,(when node `(node . ,node)))
,@(when node `((node . ,node))))
(item ((action . "update")
(jid . ,item-jid)
,(when item-name
`(name . ,item-name))
,(when item-node
`(node . ,item-node)))))
,@(when item-name
`((name . ,item-name)))
,@(when item-node
`((node . ,item-node))))))
'jabber-report-success "Disco publish"
'jabber-report-success "Disco publish"))
@ -152,11 +152,11 @@ invalidate cache and get fresh data."
(jabber-send-iq jc nil
"set"
`(query ((xmlns . "http://jabber.org/protocol/disco#items")
,(when node `(node . ,node)))
,@(when node `((node . ,node))))
(item ((action . "remove")
(jid . ,item-jid)
,(when item-node
`(node . ,item-node)))))
,@(when item-node
`((node . ,item-node))))))
'jabber-report-success "Disco removal"
'jabber-report-success "Disco removal"))