mod_session.c.patch [plain text]
--- /tmp/jabberd-2.2.14/sm/mod_session.c 2011-05-31 15:11:37.000000000 -0700
+++ ./jabberd2/sm/mod_session.c 2011-06-22 20:13:00.000000000 -0700
@@ -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;
}