]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
more long PENDING fixes
authorwessels <>
Sat, 18 Jan 1997 13:04:02 +0000 (13:04 +0000)
committerwessels <>
Sat, 18 Jan 1997 13:04:02 +0000 (13:04 +0000)
src/ipcache.cc

index 75cd0afd804fdca8c5032a0e66cb6fc5090690df..f9e5228c3b811caf2c7cd855afd27521db81432d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ipcache.cc,v 1.95 1997/01/13 20:44:45 wessels Exp $
+ * $Id: ipcache.cc,v 1.96 1997/01/18 06:04:02 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -687,9 +687,9 @@ ipcache_nbgethostbyname(const char *name, int fd, IPH handler, void *handlerData
        IpcacheStats.pending_hits++;
        ipcacheAddPending(i, fd, handler, handlerData);
        if (squid_curtime - i->expires > 60) {
-           ipcacheChangeKey(i);
-           i->status = IP_NEGATIVE_CACHED;
+           debug(14,0,"ipcache_nbgethostbyname: '%s' PENDING for %d seconds, aborting\n", name, squid_curtime + Config.negativeDnsTtl - i->expires);
            ipcache_call_pending(i);
+           ipcacheChangeKey(i);
        }
        return;
     } else {
@@ -1086,7 +1086,7 @@ ipcacheChangeKey(ipcache_entry * i)
        debug_trap("ipcacheChangeKey: hash_remove_link() failed\n");
        return;
     }
-    sprintf(new_key, "%d/%128.128s", ++index, i->name);
+    sprintf(new_key, "%d/%-128.128s", ++index, i->name);
     safe_free(i->name);
     i->name = xstrdup(new_key);
     ipcache_add_to_hash(i);