[mw-devel] MW3 r1131 - trunk/src

psycodom at sucs.org psycodom at sucs.org
Sat Dec 12 07:07:56 GMT 2009


Author: psycodom
Date: 2009-12-12 07:07:56 +0000 (Sat, 12 Dec 2009)
New Revision: 1131

Modified:
   trunk/src/log.c
Log:
Fix to stop urls which match both ^www\\. and ^[[:alnum:]_.-]+\\.(com|org|net|gov|(co|org|net|gov)\\.uk) being add to the db twice


Modified: trunk/src/log.c
===================================================================
--- trunk/src/log.c	2009-12-11 22:54:23 UTC (rev 1130)
+++ trunk/src/log.c	2009-12-12 07:07:56 UTC (rev 1131)
@@ -143,7 +143,11 @@
 				if (u->type == URL) {
 					/* found a url */
 					/*printf("Found url: '%s'\n", token); */
-					if (nfoundurl < 20) foundurl[nfoundurl++] = token;
+					if (nfoundurl < 20) {
+						if(nfoundurl == 0 || foundurl[nfoundurl - 1] != token) {
+							foundurl[nfoundurl++] = token;
+						}
+					}
 				} 
 				if (u->type == FLAG) {
 					/* printf("Found flag: '%s' -> %x\n", token, u->flags); */




More information about the mw-devel mailing list