[JDEV] Strange change in jsm (CVS)
Stefan Praszalowicz
stefan.praszalowicz at edi-presse.fr
Sat Sep 1 16:32:52 CDT 2001
Hi all !
I now use the CVS version of jabberd and noticed a little oddity in
mod_presence.
To reproduce:
userA has userB in his roster
userB has userA in his roster
login as userA
login as userB
-> What happens is that userA received presence from userB, but userB does
not
receive presence from userA
A message like 'invalid message, no recipient' is logged and the presence (I
understand it's a probe answer) is dropped.
The following patch corrects the problem:
===============================================================
--- ./old/mod_presence.c Sat Sep 1 00:23:07 2001
+++ ./new/mod_presence.c Sat Sep 1 00:21:53 2001
@@ -70,8 +70,13 @@
log_debug("mod_presence","probe from %s and no presence to
return",jid_full(m->packet->from));
}else if(_mod_presence_notified(m->packet->from,notify))
{
+ xmlnode pres;
log_debug("mod_presence","got a probe, responding to
%s",jid_full(m->packet->from));
- js_deliver(m->si,jpacket_new(xmlnode_dup(m->s->presence)));
+
+ pres = xmlnode_dup(m->s->presence);
+ xmlnode_put_attrib(pres, "to", jid_full(m->packet->from));
+
+ js_deliver(m->si,jpacket_new(pres));
}else{
log_debug("mod_presence","%s attempted to probe by someone not
qualified",jid_full(m->packet->from));
===============================================================
It seems the 'stock' jsm code has something like this but that it disappeard
afterwise ... Anyway
Happy jabbering
More information about the JDev
mailing list