]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Some corrections/additions from the original /etc/hosts patch:
authorhno <>
Sun, 31 Dec 2000 12:15:38 +0000 (12:15 +0000)
committerhno <>
Sun, 31 Dec 2000 12:15:38 +0000 (12:15 +0000)
* The 'H' flag in the ipcache cachemgr output was missing.
* The memory allocation comment on ipcacheAddEntryFromHosts was plain wrong
  (copy pasted from fqdncache.c I think.. correct there but not here)

src/ipcache.cc

index fa9c261fdb7d3fe67164a353b10825185ffabc28..77cdc57c8888e994ef8836937c78ac86102cba6f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.228 2000/12/30 23:29:06 wessels Exp $
+ * $Id: ipcache.cc,v 1.229 2000/12/31 05:15:38 hno Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -509,8 +509,9 @@ static void
 ipcacheStatPrint(ipcache_entry * i, StoreEntry * sentry)
 {
     int k;
-    storeAppendPrintf(sentry, " %-32.32s  %c %6d %6d %2d(%2d)",
+    storeAppendPrintf(sentry, " %-32.32s %c%c %6d %6d %2d(%2d)",
        hashKeyStr(&i->hash),
+       i->flags.fromhosts ? 'H' : ' ',
        i->flags.negcached ? 'N' : ' ',
        (int) (squid_curtime - i->lastref),
        (int) ((i->flags.fromhosts ? -1 : i->expires - squid_curtime)),
@@ -720,8 +721,8 @@ ipcache_restart(void)
 }
 
 /*
- *  adds a "static" entry from /etc/hosts.  the worldist is to be
- *  managed by the caller, including pointed-to strings
+ *  adds a "static" entry from /etc/hosts.  
+ *  returns 0 upon success, 1 if the ip address is invalid
  */
 int
 ipcacheAddEntryFromHosts(const char *name, const char *ipaddr)