[JDEV] [patch] jabber 1.2 and 1.3 : fix to avoid ignoring new connections
David Le Corfec
david.le-corfec at idealx.com
Fri Dec 1 05:19:54 CST 2000
If you attempt to disconnect an user from a JSM module,
by calling js_session_route(m->s, NULL) or js_session_end(),
subsequent connections attempts from any client will fail,
which is a major bug for a server :)
The following patch is for v1.2 (pthsock/io_select.c),
but it should be applied to v1.3 (jabberd/mio.c) because
it's the same code :)
diff -u -p pthsock/io_select.c.orig pthsock/io_select.c
--- pthsock/io_select.c.orig 2000/11/03 10:10:52
+++ pthsock/io_select.c 2000/12/01 11:02:05
@@ -360,6 +360,9 @@ void _io_main(void *arg)
/* new connection */
if(cur->type==type_LISTEN)
{
+ if (cur->fd > maxfd)
+ maxfd = cur->fd;
+
c = _io_accept(cur);
if(c != NULL)
{
--
David Le Corfec
More information about the JDev
mailing list