[jdev] _c2s_client_sx_callback

Remy HAREL remy.harel at GICM.FR
Thu Jun 10 07:45:39 CDT 2004

  Yet, this is the result of a tcpdump listenning to the router. We can 
see the datas I added ( begins by Seq: ... ) and the to field, that I 
can know. But there is a "from" field in this stanzas, there's really no 
way to get it with NAD_AVAL ? If I could get the "to" attribute I should 
probably get the "from" attributes, shouldn't I ?

<route xmlns='http://jabberd.jabberstudio.org/ns/component/1.0' to='c2s' 
from='jabber.gicm.net' Seq:='db93e84
c6f209da33c7c1c56645fe4c0:2'><message xmlns='jabber:client' 
to='rem at jabber.gicm.net/Gabber' type='chat' 
from='rem2 at jabber.gicm.net/Gabber' sm:c2s='7' 

Matthias Wimmer wrote:

>Hi Remy!
>Remy HAREL schrieb am 2004-06-10 12:20:45:
>>  I'm working in c2s component. Now, I'm able to know the recipient of 
>>a packet now ( thanks to Mathias Wimmer ;) ) but sometimes, when the 
>>recipient is me, I'd like to know the full jabber id  which has sent it 
>>to me . So I use the same method for the two functions calls :
>>               attr1 = nad_find_attr(nad, 0, -1, "from", NULL);
>>               attr = nad_find_attr(nad, 0, -1, "to", NULL);
>>The second works fine, but the first one returns -1, so it failed. Why 
>>I can't do that please ?
>Because you should not do this in c2s ... I already warned you some time
>Jabber clients normally don't sent a from attribute (and if they do, the
>to attribute is overwritten by the server anyway). The incoming stanzas
>where you are looking for the from attribute just don't have such an
>(The attribute is added by the session manager (sm) ... they never get a
>from attribute in c2s.)
>Tot kijk
>    Matthias
>jdev mailing list
>jdev at jabber.org

Remy Harel - remy.harel at gicm.fr
G.I.C.M - Distributed Systems & IT
Linux Registered User #224740

More information about the JDev mailing list