comparison src/scanner.cpp @ 131:df355d117199

uribl lookups fully qualified; allow two component host names
author carl
date Tue, 01 Aug 2006 10:44:55 -0700
parents e316f6fd9c39
children ecb40aa3eaa5
comparison
equal deleted inserted replaced
130:e316f6fd9c39 131:df355d117199
1209 if (!strchr((const char *)pending, '@')) { 1209 if (!strchr((const char *)pending, '@')) {
1210 // not an email address or message id 1210 // not an email address or message id
1211 char *p1 = strchr((const char *)pending, '.'); 1211 char *p1 = strchr((const char *)pending, '.');
1212 char *p2 = strrchr((const char *)pending, '.'); 1212 char *p2 = strrchr((const char *)pending, '.');
1213 char *p3 = strstr((const char *)pending, ".."); 1213 char *p3 = strstr((const char *)pending, "..");
1214 if (p1 && (p1 != pending) & !p3) { 1214 if (p1 && (p1 != (char*)pending) & !p3) {
1215 // have a period, so at least two components, and no empty components 1215 // have a period, so at least two components, and no empty components
1216 in_addr ip; 1216 in_addr ip;
1217 if (inet_aton((const char*)pending, &ip)) 1217 if (inet_aton((const char*)pending, &ip))
1218 memory->new_url((char*)pending); 1218 memory->new_url((char*)pending);
1219 else { 1219 else {