[JDEV] Possible bug with ask='subscribe'

DJ Adams dj.adams at pobox.com
Mon May 21 02:10:16 CDT 2001


On Sun, May 20, 2001 at 06:39:58PM -0400, Julian Missig wrote:
> When I do:
> <iq type='set'><query xmlns='jabber:iq:roster'><item
> jid='julian at jabber.com' name='julian-test'/></query></iq>

...

> No more ask='subscribe' ... It should not be the client's responsibility

Hi Julian

Is this against a ver 1.4 Jabber server? 

I suspect so because the 1.4 version of jsm/modules/mod_roster.c
has, in the place relevant to what you're doing, this:

/* copy the old stuff into the new one and insert it into the roster */
xmlnode_put_attrib(cur,"subscription",xmlnode_get_attrib(item,"subscription"));
xmlnode_put_attrib(cur,"subscribe",xmlnode_get_attrib(item,"subscribe")); 
 
which is slightly wrong as "subscribe" isn't a valid attribute of <item>, and
more importantly, the "ask" attribute isn't getting copied. 

It is fixed in 1.4.1 though:

/* copy the old stuff into the new one and insert it into the roster */
xmlnode_put_attrib(cur,"subscription",xmlnode_get_attrib(item,"subscription"));
xmlnode_put_attrib(cur,"ask",xmlnode_get_attrib(item,"ask")); 

Anyway, that's what I suspect it is. 

You never know though, I'm probably talking rubbish.

dj




More information about the JDev mailing list