[JDEV] Strange change in jsm (CVS)
temas
temas at box5.net
Tue Sep 4 14:27:22 CDT 2001
CVS code is unstable, and some major presence fixes are being worked on.
The code has very little testing, so be careful, events like this might
not be uncommon for a while.
--temas
On Sat, 2001-09-01 at 16:32, Stefan Praszalowicz wrote:
> 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
>
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20010904/02c0ff9b/attachment-0002.pgp>
More information about the JDev
mailing list