[JDEV] [patch mod_presence.c]

Rodolphe Duge de Bernonville rod at idealx.com
Tue Feb 20 04:41:42 CST 2001

Under heavy load and for an unknow reason (for the moment :)

_js_session_end may be call before a last call to mod_presence.

this will free the pres field in the session struct via
which will cause many problems in the mod_presence module in 
the mod_presence_out call. 

I think it is because of the xdb_get call to have the roster.
So, for the moment, (it works but not very nice), after each xdb call 
in this function, I recommend to do that :

/* push to roster subscriptions */
    roster = xdb_get(m->si->xc, m->user->id, NS_ROSTER);
/*  WARNING : possible to have s->presence modify by js_session_end  */
    if (m->s->exit_flag == 1){
	return M_HANDLED;

More information about the JDev mailing list