Mercurial > dnsbl
comparison src/scanner.cpp @ 29:4dfdf33f1db0 stable-2-4
add syslog msg freeing memory, use bare tld names without leading period
author | carl |
---|---|
date | Thu, 27 May 2004 16:17:48 -0700 |
parents | 33e1e3910506 |
children | 8f43f8fa1ad7 |
comparison
equal
deleted
inserted
replaced
28:33e1e3910506 | 29:4dfdf33f1db0 |
---|---|
951 char *p2 = strrchr((const char *)pending, '.'); | 951 char *p2 = strrchr((const char *)pending, '.'); |
952 if (p1 && (p1 != p2)) { | 952 if (p1 && (p1 != p2)) { |
953 // have two periods, so three components | 953 // have two periods, so three components |
954 for (int i=1; i<count; i++) pending[i] = tolower(pending[i]); | 954 for (int i=1; i<count; i++) pending[i] = tolower(pending[i]); |
955 // is last component a tld? | 955 // is last component a tld? |
956 string_set::iterator i = memory->tlds->find(p2); | 956 string_set::iterator i = memory->tlds->find(p2+1); |
957 if (i != memory->tlds->end()) memory->new_url((char*)pending); | 957 if (i != memory->tlds->end()) memory->new_url((char*)pending); |
958 } | 958 } |
959 } | 959 } |
960 st = h_init; | 960 st = h_init; |
961 } // fall thru | 961 } // fall thru |