Revision: 1909
http://undernet-ircu.svn.sourceforge.net/undernet-ircu/?rev=1909&view=rev
Author: entrope
Date: 2009-03-18 03:31:58 +0000 (Wed, 18 Mar 2009)
Log Message:
-----------
Optimize order of checks in if() to minimize calls to match_it().
Modified Paths:
--------------
ircu2/branches/u2_10_12_branch/ChangeLog
ircu2/branches/u2_10_12_branch/ircd/send.c
Modified: ircu2/branches/u2_10_12_branch/ChangeLog
===================================================================
--- ircu2/branches/u2_10_12_branch/ChangeLog 2009-03-18 02:15:48 UTC (rev
1908)
+++ ircu2/branches/u2_10_12_branch/ChangeLog 2009-03-18 03:31:58 UTC (rev
1909)
@@ -1,5 +1,10 @@
2009-03-17 Michael Poole <[email protected]>
+ * ircd/send.c (sendcmdto_match_butone): Move match_it() to the end
+ of the if() to minimize the number of expensive function calls.
+
+2009-03-17 Michael Poole <[email protected]>
+
* patches/diffs/antispambot.diff: Forward port a patch by Dianora
to add rudimentary spam bot detection to ircu.
Modified: ircu2/branches/u2_10_12_branch/ircd/send.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/send.c 2009-03-18 02:15:48 UTC (rev
1908)
+++ ircu2/branches/u2_10_12_branch/ircd/send.c 2009-03-18 03:31:58 UTC (rev
1909)
@@ -761,9 +761,9 @@
/* send buffer along */
bump_sentalong(one);
for (cptr = GlobalClientList; cptr; cptr = cli_next(cptr)) {
- if (!IsRegistered(cptr) || IsServer(cptr) ||
- !match_it(from, cptr, to, who) || cli_fd(cli_from(cptr)) < 0 ||
- cli_sentalong(cptr) == sentalong_marker)
+ if (!IsRegistered(cptr) || IsServer(cptr) || cli_fd(cli_from(cptr)) < 0 ||
+ cli_sentalong(cptr) == sentalong_marker ||
+ !match_it(from, cptr, to, who))
continue; /* skip it */
cli_sentalong(cptr) = sentalong_marker;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches