diff -N -u -r -X exclude_files squid-1.0.beta14/src/ipcache.c squid-1.0.beta14.henrik/src/ipcache.c --- squid-1.0.beta14/src/ipcache.c Fri Jun 7 06:37:16 1996 +++ squid-1.0.beta14.henrik/src/ipcache.c Sun Jun 9 19:32:01 1996 @@ -234,11 +234,6 @@ if (result == NULL) return NULL; - if (((result->timestamp + result->ttl) < squid_curtime) && - (result->status != IP_PENDING)) { /* expired? */ - ipcache_release(result); - return NULL; - } return result; } @@ -784,7 +779,13 @@ ipcache_call_pending_badname(fd, handler, handlerData); return 0; } - if ((i = ipcache_get(name)) == NULL) { + i = ipcache_get(name); + if ( i != NULL && ((i->timestamp + i->ttl) < squid_curtime) && + (i->status != IP_PENDING)) { /* expired? */ + ipcache_release(i); + i=NULL; + } + if (i == NULL) { /* MISS: No entry, create the new one */ debug(14, 5, "ipcache_nbgethostbyname: MISS for '%s'\n", name); IpcacheStats.misses++;