[JDEV] Re: [JBUG] [patch] jabber 1.2 and 1.3 : fix to avoid ignoring new connections

Keith Minkler keith at digix.dyndns.org
Sun Dec 3 16:50:28 CST 2000


David,

    Thank you for this fix, it will make it into my next CVS commit... 

    it also fixes another problem i had *just* run into.. when i have more than 2 or 3 services that all listened on the same port, none of them seemed to accept any connections, and your patch has fixed this.. kudos! =]

    this patch will make it into the 1.3/1.4 server.

    -Keith


On Fri, Dec 01, 2000 at 12:19:54PM +0100, David Le Corfec wrote:
> 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
> 
> _______________________________________________
> Bugs mailing list
> Bugs at jabber.org
> http://mailman.jabber.org/listinfo/bugs





More information about the JDev mailing list