[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

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
   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
         }else if(_mod_presence_notified(m->packet->from,notify))
+            xmlnode pres;
             log_debug("mod_presence","got a probe, responding to
-            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));
             log_debug("mod_presence","%s attempted to probe by someone not


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