Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2006-05-06 23:48:37 UTC
Modified files:
Tag: u2_10_12_branch
ChangeLog ircd/m_pong.c
Log message:
Avoid doing needless work for unregistered client PONGs.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.94 ircu2.10/ChangeLog:1.710.2.95
--- ircu2.10/ChangeLog:1.710.2.94 Sat May 6 16:40:26 2006
+++ ircu2.10/ChangeLog Sat May 6 16:48:26 2006
@@ -1,5 +1,10 @@
2006-05-06 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/m_pong.c (mr_pong): No need to do any work if the client
+ PONGs with no pending PING.
+
+2006-05-06 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/s_auth.c (AuthRequestFlag): Add AR_PASSWORD_CHECKED.
(check_auth_finished): Move password check out of iauth-only part
and use AR_PASSWORD_CHECKED to make sure we only check it once.
Index: ircu2.10/ircd/m_pong.c
diff -u ircu2.10/ircd/m_pong.c:1.16.2.2 ircu2.10/ircd/m_pong.c:1.16.2.3
--- ircu2.10/ircd/m_pong.c:1.16.2.2 Fri Feb 17 02:34:59 2006
+++ ircu2.10/ircd/m_pong.c Sat May 6 16:48:26 2006
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_pong.c,v 1.16.2.2 2006/02/17 10:34:59 decampos Exp $
+ * $Id: m_pong.c,v 1.16.2.3 2006/05/06 23:48:26 entrope Exp $
*/
/*
@@ -162,6 +162,8 @@
assert(cptr == sptr);
assert(!IsRegistered(sptr));
+ if (!HasFlag(cptr, FLAG_PINGSENT))
+ return 0;
ClrFlag(cptr, FLAG_PINGSENT);
cli_lasttime(cptr) = CurrentTime;
return (parc > 1) ? auth_set_pong(cli_auth(sptr), strtoul(parv[parc - 1],
NULL, 10)) : 0;
@@ -178,6 +180,7 @@
{
assert(0 != cptr);
assert(cptr == sptr);
+
ClrFlag(cptr, FLAG_PINGSENT);
cli_lasttime(cptr) = CurrentTime;
return 0;
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches