Le 01/04/2014 14:23, Tomasz Sterna a écrit :
Dnia 2014-04-01, wto o godzinie 12:14 +0200, Sylvain Guglielmi pisze:
The problem is :
- When an user connects to jabberd2 for the first time, the
active,logout... tables are empty, and the roster is already filled.
- The code in dispatch.c : 130 states that "if one of the user_load
module fails, an unsuscribed-packet will be sent", presumably to clean
the user's rosters on every session by removing this "unknown
contact".
Just remove 'active' module from 'user-load' chain in your sm.xml.
Unfortunately it does not work : When I remove 'active' module from
'user-load' chain, the auto-create in sess.c does not trigger since
user_load returned sucessfully. user_create is never called for new
users. This causes other issues (For example, "active" is never filled
for the user. My search module relies on it, and you said that offline
messages checked that too, and I'd not be surprised if others modules do
too).
It seems to me that it's related to something you stated earlier : there
should be differents chains for user_load, the one when an user connects
(called from sess.c) and a quicker one called from dispatch and other
locations too (which should not load roster, but only plain info such as
active or routing info).
Sadly, I have not the time now for doing all that. I think my best
option is to disable the "presence unsubscribed" in dispatch.c (via a
config option). I'd gladly accept any better solution. When I'll have
more time, I'll get back on doing the right thing.
Thanks in advance for any insight.
--
Sylvain "Gugli" Guglielmi
Gamedev@Nadeo@Ubisoft