xchat auto reconnects when net_auto_reconnect is set to 0

Bug #190986 reported by kuwanger
4
Affects Status Importance Assigned to Milestone
xchat (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xchat

1. Manually alter ~/.xchat2/xchat.conf such that net_auto_reconnect = 0.
2. Start up X-Chat2.
3. Connect to a server.
4. Cause a ping-time (for example, disconnecting your network cable).
5. Wait about ten seconds for X-Chat2 to reconnect.

This applies to xchat v2.8.4 (2.8.4-0ubuntu5) in gutsy.

In xchat-2.8.4/src/common/xchat.c, in lag_check(), "serv->auto_reconnect (serv, FALSE, -1);" should be proceeded by "if (prefs.autoreconnect)" so the autoreconnect setting is honored. If prefered, the "prefs.autoreconnectonfail" could be used instead, as it might be more appropriate.

Revision history for this message
kuwanger (kuwanger) wrote :

Here's a patch that should produce the desired results:

diff -ur xchat-2.8.4.orig/src/common/xchat.c xchat-2.8.4/src/common/xchat.c
--- xchat-2.8.4.orig/src/common/xchat.c 2007-06-01 08:32:46.000000000 -0400
+++ xchat-2.8.4/src/common/xchat.c 2008-02-28 06:34:43.000000000 -0500
@@ -177,7 +177,10 @@
                                sprintf (tbuf, "%d", lag);
                                EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
                                                                 NULL, NULL, 0);
- serv->auto_reconnect (serv, FALSE, -1);
+ if (prefs.autoreconnect)
+ serv->auto_reconnect (serv, FALSE, -1);
+ else
+ serv->disconnect (serv->server_session, FALSE, -1);
                        } else
                        {
                                snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);

Revision history for this message
Andreas Moog (ampelbein) wrote : Fixed with Update.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That specific issue is fixed with xchat 2.8.6. Thanks again for
reporting and for the patch.

 status FixReleased
 assignee nobody
 subscribe

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiumLMACgkQ06FgkPZwicQwkwCg1f2//Ho2sWlRW43RMKuQh89H
vekAn2HwqMtE+dw2B0J8SA1LR106449T
=1WRm
-----END PGP SIGNATURE-----

Changed in xchat:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.