#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.in,v 1.120 1998/02/05 21:37:49 wessels Exp $
+# $Id: Makefile.in,v 1.121 1998/02/10 21:44:30 wessels Exp $
#
# Uncomment and customize the following to suit your needs:
#
errorpage.o \
event.o \
fd.o \
- fdstat.o \
filemap.o \
fqdncache.o \
ftp.o \
/*
- * $Id: client_side.cc,v 1.205 1998/02/04 23:33:37 wessels Exp $
+ * $Id: client_side.cc,v 1.206 1998/02/10 21:44:30 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
int
httpAcceptDefer(int fdnotused, void *notused)
{
- return !fdstat_are_n_free_fd(RESERVED_FD);
+ return fdNFree() < RESERVED_FD;
}
/* Handle a new connection on HTTP socket. */
/*
- * $Id: comm.cc,v 1.226 1998/02/06 17:30:51 wessels Exp $
+ * $Id: comm.cc,v 1.227 1998/02/10 21:44:31 wessels Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
close_handler *ch;
fde *F = &fd_table[fd];
debug(5, 0) ("WARNING: FD %d has handlers, but it's invalid.\n", fd);
- debug(5, 0) ("FD %d is a %s\n", fd, fdstatTypeStr[fd_table[fd].type]);
+ debug(5, 0) ("FD %d is a %s\n", fd, fdTypeStr[fd_table[fd].type]);
debug(5, 0) ("--> %s\n", fd_table[fd].desc);
debug(5, 0) ("tmout:%p read:%p write:%p\n",
F->timeout_handler,
debug(5, 0) ("WARNING: FD %d has handlers, but it's invalid.\n", fd);
debug(5, 0) ("FD %d is a %s called '%s'\n",
fd,
- fdstatTypeStr[fd_table[fd].type],
+ fdTypeStr[fd_table[fd].type],
F->desc);
debug(5, 0) ("tmout:%p read:%p write:%p\n",
F->timeout_handler,
/*
- * $Id: fd.cc,v 1.19 1998/02/02 21:16:24 wessels Exp $
+ * $Id: fd.cc,v 1.20 1998/02/10 21:44:33 wessels Exp $
*
* DEBUG: section 51 Filedescriptor Functions
* AUTHOR: Duane Wessels
#include "squid.h"
+const char *fdTypeStr[] =
+{
+ "None",
+ "Log",
+ "File",
+ "Socket",
+ "Pipe",
+ "Unknown"
+};
+
static void fdUpdateBiggest(int fd, unsigned int status);
static void
debug(51, 1) ("Open FD %4d %s\n", i, F->desc);
}
}
+
+int
+fdNFree(void)
+{
+ return Squid_MaxFD - Number_FD;
+}
/*
- * $Id: globals.h,v 1.35 1998/02/07 08:13:37 wessels Exp $
+ * $Id: globals.h,v 1.36 1998/02/10 21:44:33 wessels Exp $
*/
extern FILE *debug_log; /* NULL */
extern const char *const null_string; /* "" */
extern const char *const version_string; /* SQUID_VERSION */
extern const char *const w_space; /* " \t\n\r" */
-extern const char *fdstatTypeStr[];
+extern const char *fdTypeStr[];
extern const char *hier_strings[];
extern const char *memStatusStr[];
extern const char *pingStatusStr[];
/*
- * $Id: main.cc,v 1.215 1998/02/06 23:58:04 wessels Exp $
+ * $Id: main.cc,v 1.216 1998/02/10 21:44:34 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
comm_init();
/* we have to init fdstat here. */
- fdstat_init();
fd_open(0, FD_LOG, "stdin");
fd_open(1, FD_LOG, "stdout");
fd_open(2, FD_LOG, "stderr");
extern void fd_bytes(int fd, int len, unsigned int type);
extern void fdFreeMemory(void);
extern void fdDumpOpen(void);
-
-extern void fdstat_init(void);
-extern int fdstat_are_n_free_fd(int);
+extern int fdNFree(void);
extern fileMap *file_map_create(int);
extern int file_map_allocate(fileMap *, int);
/*
- * $Id: stat.cc,v 1.194 1998/02/07 08:13:41 wessels Exp $
+ * $Id: stat.cc,v 1.195 1998/02/10 21:44:35 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
continue;
storeAppendPrintf(sentry, "%4d %-6.6s %4d %7d %7d %-21s %s\n",
i,
- fdstatTypeStr[f->type],
+ fdTypeStr[f->type],
f->timeout_handler ? (f->timeout - squid_curtime) / 60 : 0,
f->bytes_read,
f->bytes_written,