]>
Commit | Line | Data |
---|---|---|
3cb156e8 | 1 | Index: squid/src/fqdncache.c |
2 | diff -c squid/src/fqdncache.c:1.149.2.4 squid/src/fqdncache.c:1.149.2.5 | |
3 | *** squid/src/fqdncache.c:1.149.2.4 Sat Dec 6 10:19:37 2003 | |
4 | --- squid/src/fqdncache.c Tue Dec 7 16:40:57 2004 | |
5 | *************** | |
6 | *** 359,364 **** | |
7 | --- 359,365 ---- | |
8 | FqdncacheStats.requests++; | |
9 | if (name == NULL || name[0] == '\0') { | |
10 | debug(35, 4) ("fqdncache_nbgethostbyaddr: Invalid name!\n"); | |
11 | + dns_error_message = "Invalid hostname"; | |
12 | handler(NULL, handlerData); | |
13 | return; | |
14 | } | |
15 | *************** | |
16 | *** 444,451 **** | |
17 | --- 445,454 ---- | |
18 | } else { | |
19 | FqdncacheStats.hits++; | |
20 | f->lastref = squid_curtime; | |
21 | + dns_error_message = f->error_message; | |
22 | return f->names[0]; | |
23 | } | |
24 | + dns_error_message = NULL; | |
25 | /* check if it's already a FQDN address in text form. */ | |
26 | if (!safe_inet_addr(name, &ip)) | |
27 | return name; | |
28 | Index: squid/src/ipcache.c | |
29 | diff -c squid/src/ipcache.c:1.236.2.4 squid/src/ipcache.c:1.236.2.5 | |
30 | *** squid/src/ipcache.c:1.236.2.4 Mon Sep 27 12:17:39 2004 | |
31 | --- squid/src/ipcache.c Tue Dec 7 16:40:57 2004 | |
32 | *************** | |
33 | *** 406,415 **** | |
34 | --- 406,417 ---- | |
35 | IpcacheStats.requests++; | |
36 | if (name == NULL || name[0] == '\0') { | |
37 | debug(14, 4) ("ipcache_nbgethostbyname: Invalid name!\n"); | |
38 | + dns_error_message = "Invalid hostname"; | |
39 | handler(NULL, handlerData); | |
40 | return; | |
41 | } | |
42 | if ((addrs = ipcacheCheckNumeric(name))) { | |
43 | + dns_error_message = NULL; | |
44 | handler(addrs, handlerData); | |
45 | return; | |
46 | } | |
47 | *************** | |
48 | *** 502,511 **** | |
49 | } else { | |
50 | IpcacheStats.hits++; | |
51 | i->lastref = squid_curtime; | |
52 | return &i->addrs; | |
53 | } | |
54 | ! if ((addrs = ipcacheCheckNumeric(name))) | |
55 | return addrs; | |
56 | IpcacheStats.misses++; | |
57 | if (flags & IP_LOOKUP_IF_MISS) | |
58 | ipcache_nbgethostbyname(name, dummy_handler, NULL); | |
59 | --- 504,516 ---- | |
60 | } else { | |
61 | IpcacheStats.hits++; | |
62 | i->lastref = squid_curtime; | |
63 | + dns_error_message = i->error_message; | |
64 | return &i->addrs; | |
65 | } | |
66 | ! dns_error_message = NULL; | |
67 | ! if ((addrs = ipcacheCheckNumeric(name))) { | |
68 | return addrs; | |
69 | + } | |
70 | IpcacheStats.misses++; | |
71 | if (flags & IP_LOOKUP_IF_MISS) | |
72 | ipcache_nbgethostbyname(name, dummy_handler, NULL); |