From: hno <> Date: Sun, 31 Dec 2000 12:15:38 +0000 (+0000) Subject: Some corrections/additions from the original /etc/hosts patch: X-Git-Tag: SQUID_3_0_PRE1~1719 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=181b1adcd6abe7d7147b49f653b2b0117140f970;p=thirdparty%2Fsquid.git Some corrections/additions from the original /etc/hosts patch: * 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) --- diff --git a/src/ipcache.cc b/src/ipcache.cc index fa9c261fdb..77cdc57c88 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -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)