[JDEV] JIT hackin'

maqi at jabberstudio.org maqi at jabberstudio.org
Sat Jan 10 11:10:09 CST 2004


On Sat, 10 Jan 2004, Trejkaz Xaoza wrote:

> Okay I've been tracing around the JIT code trying to figure out why it
> doesn't add the contacts from the ICQ server when it connects.  This is
> where I get to.  It seems to exit the while() loop immediately so I
> guess the list is 'empty'.

This shouldn't be. Sometimes libicq2000 seems to drop some contacts but
that should be it.

Take a look at it_contact_subscribe.
http://jit.jabberstudio.org/codedoc/contact_8c-source.html - line 418

>/* Send "subscribed" presence. Fortunately, jabberd will add this
>   contact to the user's roster if it was not present */
This does not hold for jabberd 2 (which ignores these packets).

> x = jutil_presnew(JPACKET__SUBSCRIBED,jid_full(s->id),NULL);
> xmlnode_put_attrib(x,"from",jid_full(it_uin2jid(xmlnode_pool(x),c->uin,s->from->server)));
> if(name != NULL)
>    xmlnode_put_attrib(x,"name",it_convert_windows2utf8(xmlnode_pool(x),name));
The "name" attribute is only interpreted by jabberd 1.4.3 or a patched
jabberd 1.4.2. Therefore only these server implementations import nicks.

> it_deliver(s->ti,x);

It would be probably easiest to change this to send subscribe packets or
to change SignalServerContactEvent to construct jabber:x:roster packets.

Regards



More information about the JDev mailing list