-static char rcsid[] = "$Id: ipcache.cc,v 1.2 1996/02/23 07:07:24 wessels Exp $";
+static char rcsid[] = "$Id: ipcache.cc,v 1.3 1996/02/23 07:09:10 wessels Exp $";
/*
* File: ipcache.c
* Description: ip address cache. speed up gethostbyname()
#include "autoconf.h"
#include "stat.h"
#include "hash.h"
+#include "disk.h"
#include "util.h"
struct hostent *gethostbyname();
extern int getMaxFD();
extern int getDnsChildren();
extern void fatal_dump _PARAMS((char *));
-extern int file_write_lock _PARAMS((int));
extern int file_update_open _PARAMS((int, char *));
void update_dns_child_alive()
-static char rcsid[] = "$Id: stat.cc,v 1.3 1996/02/23 06:56:34 wessels Exp $";
+static char rcsid[] = "$Id: stat.cc,v 1.4 1996/02/23 07:07:25 wessels Exp $";
/*
* File: stat.c
* Description: stat module for object cache
extern int comm_get_fd_timeout _PARAMS((int));
extern int file_write_lock _PARAMS((int));
extern void fatal _PARAMS((char *));
+extern void fatal_dump _PARAMS((char *));
+
char *stat_describe();
char *mem_describe();
char *ttl_describe();
if (entry->mem_obj)
obj_size = entry->mem_obj->e_current_len;
tempbuf[0] = '\0';
- sprintf(tempbuf, "{ %s %d %s %s %s %s %d %ld %s %s }\n",
+ sprintf(tempbuf, "{ %s %d %s %s %s %s %d %d %s %s }\n",
entry->url,
obj_size,
elapsed_time(entry, (int) entry->timestamp, space),
elapsed_time(entry, (int) entry->lastref, space2),
ttl_describe(entry, (int) entry->expires),
npend,
- entry->refcount,
+ (int) entry->refcount,
mem_describe(entry),
stat_describe(entry));
storeAppend(sentry, tempbuf, strlen(tempbuf));
/* the lifetime should be greater than curtime */
lft = comm_get_fd_lifetime(i);
to = comm_get_fd_timeout(i);
- sprintf(line, "{\t\t(%3d = %3ld, %3ld) NET %s}\n",
+ sprintf(line, "{\t\t(%3d = %3d, %3d) NET %s}\n",
i,
- lft > 0 ? lft - cached_curtime : -1,
- max((to - cached_curtime), 0),
+ (int) (lft > 0 ? lft - cached_curtime : -1),
+ (int) max((to - cached_curtime), 0),
fd_note(i, NULL));
break;
case File: