mod_session.c.patch [plain text]
--- /tmp/jabberd-2.2.13/sm/mod_session.c 2011-02-23 08:24:34.000000000 -0800
+++ ./jabberd2/sm/mod_session.c 2011-02-24 16:25:21.000000000 -0800
@@ -329,12 +329,11 @@ static mod_ret_t _session_pkt_router(mod
xhv.sess_val = &sess;
if(xhash_iter_first(mi->mod->mm->sm->sessions))
- while (xhash_iter_get(mi->mod->mm->sm->sessions, NULL, NULL, xhv.val)) {
+ do {
+ xhash_iter_get(mi->mod->mm->sm->sessions, NULL, NULL, xhv.val);
if(strcmp(sess->c2s, pkt->from->domain) == 0)
sess_end(sess);
- else
- xhash_iter_next(mi->mod->mm->sm->sessions);
- }
+ } while (xhash_iter_next(mi->mod->mm->sm->sessions));
return mod_PASS;
}