From 43c3424b57f0348656b4db4498d531c8fac4517c Mon Sep 17 00:00:00 2001
From: wessels <>
Date: Mon, 25 Aug 1997 21:55:19 +0000
Subject: [PATCH] Ed Knowles cleanup
---
errors/Makefile.in | 4 +++-
icons/Makefile.in | 5 ++++-
lib/snprintf.c | 8 +++-----
src/access_log.cc | 6 +++---
src/cache_cf.cc | 8 ++++----
src/cachemgr.cc | 10 +++++++++-
src/tools.cc | 4 ++--
7 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/errors/Makefile.in b/errors/Makefile.in
index c0ba91dc80..0a88941167 100644
--- a/errors/Makefile.in
+++ b/errors/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1 1997/07/28 06:41:16 wessels Exp $
+# $Id: Makefile.in,v 1.2 1997/08/25 15:55:19 wessels Exp $
#
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -47,3 +47,5 @@ install-mkdirs:
clean:
+distclean: clean
+ -rm -f Makefile
diff --git a/icons/Makefile.in b/icons/Makefile.in
index 89a2ac1e00..e747ac2d29 100644
--- a/icons/Makefile.in
+++ b/icons/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.3 1997/07/19 05:01:39 wessels Exp $
+# $Id: Makefile.in,v 1.4 1997/08/25 15:55:20 wessels Exp $
#
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -80,3 +80,6 @@ install-mkdirs:
clean:
$(RM) -f $(ICONS)
+
+distclean: clean
+ -rm -f Makefile
diff --git a/lib/snprintf.c b/lib/snprintf.c
index d8e6fcb3eb..9df89f95cd 100644
--- a/lib/snprintf.c
+++ b/lib/snprintf.c
@@ -15,7 +15,6 @@
/* Original RCS tag:
* Id: snprintf.c,v 1.1 1995/08/19 20:36:09 papowell Exp */
-static void dopr();
static char *end;
#include "config.h"
@@ -61,9 +60,11 @@ XX **NO VARARGS ** XX
#ifdef HAVE_STDARGS
int snprintf(char *str, size_t count, const char *fmt,...);
int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
+static void dopr(char *, const char *, va_list);
#else
int snprintf();
int vsnprintf();
+static void dopr();
#endif
int
@@ -120,10 +121,7 @@ static char *output;
static void dopr_outch(int c);
static void
-dopr(buffer, format, args)
- char *buffer;
- char *format;
- va_list args;
+dopr(char *buffer, const char *format, va_list args)
{
int ch;
long value;
diff --git a/src/access_log.cc b/src/access_log.cc
index 36c5bae16e..6144e2f516 100644
--- a/src/access_log.cc
+++ b/src/access_log.cc
@@ -1,6 +1,6 @@
/*
- * $Id: access_log.cc,v 1.4 1997/07/26 04:48:21 wessels Exp $
+ * $Id: access_log.cc,v 1.5 1997/08/25 15:55:21 wessels Exp $
*
* DEBUG: section 46 Access Log
* AUTHOR: Duane Wessels
@@ -261,12 +261,12 @@ void
hierarchyNote(HierarchyLogEntry * hl,
hier_code code,
icp_ping_data * icpdata,
- const char *cache_host)
+ const char *cache_peer)
{
assert(hl != NULL);
hl->code = code;
if (icpdata)
hl->icp = *icpdata;
- xstrncpy(hl->host, cache_host, SQUIDHOSTNAMELEN);
+ xstrncpy(hl->host, cache_peer, SQUIDHOSTNAMELEN);
hl->icp.stop = current_time;
}
diff --git a/src/cache_cf.cc b/src/cache_cf.cc
index 5b155166e8..aeb53a2e69 100644
--- a/src/cache_cf.cc
+++ b/src/cache_cf.cc
@@ -1,5 +1,5 @@
/*
- * $Id: cache_cf.cc,v 1.221 1997/08/25 05:29:55 wessels Exp $
+ * $Id: cache_cf.cc,v 1.222 1997/08/25 15:55:22 wessels Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
@@ -653,7 +653,7 @@ parse_peeracl(void)
acl_list **Tail = NULL;
acl *a = NULL;
if ((p = peerFindByName(host)) == NULL) {
- debug(15, 0) ("%s, line %d: No cache_host '%s'\n",
+ debug(15, 0) ("%s, line %d: No cache_peer '%s'\n",
cfg_filename, config_lineno, host);
return;
}
@@ -690,7 +690,7 @@ parse_hostdomain(void)
domain_ping **L = NULL;
peer *p;
if ((p = peerFindByName(host)) == NULL) {
- debug(15, 0) ("%s, line %d: No cache_host '%s'\n",
+ debug(15, 0) ("%s, line %d: No cache_peer '%s'\n",
cfg_filename, config_lineno, host);
continue;
}
@@ -721,7 +721,7 @@ parse_hostdomaintype(void)
domain_type **L = NULL;
peer *p;
if ((p = peerFindByName(host)) == NULL) {
- debug(15, 0) ("%s, line %d: No cache_host '%s'\n",
+ debug(15, 0) ("%s, line %d: No cache_peer '%s'\n",
cfg_filename, config_lineno, host);
return;
}
diff --git a/src/cachemgr.cc b/src/cachemgr.cc
index 9e319080db..ef1fb92e66 100644
--- a/src/cachemgr.cc
+++ b/src/cachemgr.cc
@@ -1,7 +1,7 @@
/*
- * $Id: cachemgr.cc,v 1.57 1997/08/25 05:29:55 wessels Exp $
+ * $Id: cachemgr.cc,v 1.58 1997/08/25 15:55:22 wessels Exp $
*
* DEBUG: section 0 CGI Cache Manager
* AUTHOR: Harvest Derived
@@ -235,6 +235,7 @@ typedef enum {
STATS_NETDB,
SHUTDOWN,
REFRESH,
+ PCONN,
#ifdef REMOVE_OBJECT
REMOVE,
#endif
@@ -262,6 +263,7 @@ static const char *const op_cmds[] =
"netdb",
"shutdown",
"refresh",
+ "pconn",
#ifdef REMOVE_OBJECT
"remove",
#endif
@@ -289,6 +291,7 @@ static const char *const op_cmds_descr[] =
"Network Probe Database",
"Shutdown Cache",
"Refresh Object (URL required)",
+ "Persistant Connection Statistics",
#ifdef REMOVE_OBJECT
"Remove Object (URL required)",
#endif
@@ -383,6 +386,7 @@ noargs_html(char *host, int port, char *url, char *password)
print_option(op, STATS_R);
print_option(op, SHUTDOWN);
print_option(op, REFRESH);
+ print_option(op, PCONN);
#ifdef REMOVE_OBJECT
print_option(op, REMOVE);
#endif
@@ -744,6 +748,7 @@ main(int argc, char *argv[])
case STATS_HDRS:
case STATS_FDS:
case STATS_NETDB:
+ case PCONN:
case SHUTDOWN:
sprintf(msg, "GET cache_object://%s/%s@%s HTTP/1.0\r\n\r\n",
hostname, op_cmds[op], password);
@@ -791,6 +796,7 @@ main(int argc, char *argv[])
print_option(op, STATS_F);
print_option(op, STATS_D);
print_option(op, STATS_R);
+ print_option(op, PCONN);
printf("\n");
printf("\n", hostname);
printf("\n", portnum);
@@ -841,6 +847,7 @@ main(int argc, char *argv[])
case STATS_NETDB:
case SHUTDOWN:
case REFRESH:
+ case PCONN:
break;
case PARAM:
if (hasTables) {
@@ -926,6 +933,7 @@ main(int argc, char *argv[])
case STATS_FDS:
case STATS_NETDB:
case SHUTDOWN:
+ case PCONN:
p_state = 1;
printf("%s", reserve);
break;
diff --git a/src/tools.cc b/src/tools.cc
index 2e6bee2c45..a087e22ea7 100644
--- a/src/tools.cc
+++ b/src/tools.cc
@@ -1,6 +1,6 @@
/*
- * $Id: tools.cc,v 1.118 1997/08/25 15:49:04 wessels Exp $
+ * $Id: tools.cc,v 1.119 1997/08/25 15:55:25 wessels Exp $
*
* DEBUG: section 21 Misc Functions
* AUTHOR: Harvest Derived
@@ -173,7 +173,7 @@ mail_warranty(void)
}
static void
-dumpMallocStats()
+dumpMallocStats(void)
{
#if HAVE_MSTATS && HAVE_GNUMALLOC_H
struct mstats ms = mstats();
--
2.47.2