-/* $Id: comm.cc,v 1.22 1996/04/12 21:14:39 wessels Exp $ */
+/* $Id: comm.cc,v 1.23 1996/04/12 21:22:54 wessels Exp $ */
/* DEBUG: Section 5 comm: socket level functions */
fd_table[fd].write_handler,
fd_table[fd].except_handler);
if ((tmp = fd_table[fd].lifetime_handler)) {
- debug(5,0,"examine_select: Calling Lifetime Handler\n");
+ debug(5, 0, "examine_select: Calling Lifetime Handler\n");
tmp(fd, fd_table[fd].lifetime_data);
} else if ((tmp = fd_table[fd].timeout_handler)) {
- debug(5,0,"examine_select: Calling Timeout Handler\n");
+ debug(5, 0, "examine_select: Calling Timeout Handler\n");
tmp(fd, fd_table[fd].timeout_data);
}
fd_table[fd].lifetime_handler = 0;
for (fd = 0; fd < max_fd; fd++) {
lft = comm_get_fd_lifetime(fd);
if ((lft != -1) && (lft < cached_curtime)) {
- if (fd_table[fd].lifetime_handler != NULL) {
+ if (fd_table[fd].lifetime_handler != NULL) {
use_lifetime_handler = 1;
tmp_local = fd_table[fd].lifetime_handler;
fd_table[fd].lifetime_handler = 0; /* reset it */
-/* $Id: http.cc,v 1.42 1996/04/12 21:15:33 wessels Exp $ */
+/* $Id: http.cc,v 1.43 1996/04/12 21:22:55 wessels Exp $ */
/*
* DEBUG: Section 11 http: HTTP
ybuf = NULL;
}
}
-
/* Add Forwarded: header */
- ybuf = get_free_4k_page(__FILE__,__LINE__);
+ ybuf = get_free_4k_page(__FILE__, __LINE__);
if (data->entry->mem_obj)
cfd = data->entry->mem_obj->fd_of_first_client;
if (cfd < 0) {
- sprintf(ybuf, "Forwarded: by http://%s:%d/\r\n",
+ sprintf(ybuf, "Forwarded: by http://%s:%d/\r\n",
getMyHostname(), getAsciiPortNum());
} else {
- sprintf(ybuf, "Forwarded: by http://%s:%d/ for %s\r\n",
+ sprintf(ybuf, "Forwarded: by http://%s:%d/ for %s\r\n",
getMyHostname(), getAsciiPortNum(), fd_table[cfd].ipaddr);
}
strcat(buf, ybuf);
-/* $Id: neighbors.cc,v 1.15 1996/04/12 21:21:06 wessels Exp $ */
+/* $Id: neighbors.cc,v 1.16 1996/04/12 21:22:57 wessels Exp $ */
/* TODO:
* - change 'neighbor' to 'sibling'
e->host, url);
/* e->header.reqnum++; */
- if (BIT_TEST(entry->flag, KEY_PRIVATE))
- e->header.reqnum = atoi(entry->key);
+ if (BIT_TEST(entry->flag, KEY_PRIVATE))
+ e->header.reqnum = atoi(entry->key);
else
- e->header.reqnum = getKeyCounter();
+ e->header.reqnum = getKeyCounter();
debug(15, 3, "neighborsUdpPing: key = '%s'\n", entry->key);
debug(15, 3, "neighborsUdpPing: reqnum = %d\n", e->header.reqnum);
-/* $Id: store.cc,v 1.47 1996/04/12 21:22:16 wessels Exp $ */
-#ident "$Id: store.cc,v 1.47 1996/04/12 21:22:16 wessels Exp $"
+/* $Id: store.cc,v 1.48 1996/04/12 21:22:58 wessels Exp $ */
+#ident "$Id: store.cc,v 1.48 1996/04/12 21:22:58 wessels Exp $"
/*
* DEBUG: Section 20 store
unsigned int getKeyCounter()
{
- static unsigned int key_counter = 0;
- if (++key_counter == 0)
- ++key_counter;
- return key_counter;
+ static unsigned int key_counter = 0;
+ if (++key_counter == 0)
+ ++key_counter;
+ return key_counter;
}
char *storeGeneratePrivateKey(url, method, num)
static char to[MAXPATHLEN];
if ((fname = getStoreLogFile()) == NULL)
- return;
+ return;
debug(20, 1, "storeRotateLog: Rotating.\n");
/* Rotate numbers 0 through N up one */
for (i = getLogfileRotateNumber(); i > 1;) {
- i--;
- sprintf(from, "%s.%d", fname, i - 1);
- sprintf(to, "%s.%d", fname, i);
- rename(from, to);
+ i--;
+ sprintf(from, "%s.%d", fname, i - 1);
+ sprintf(to, "%s.%d", fname, i);
+ rename(from, to);
}
/* Rotate the current log to .0 */
if (getLogfileRotateNumber() > 0) {
- sprintf(to, "%s.%d", fname, 0);
- rename(fname, to);
+ sprintf(to, "%s.%d", fname, 0);
+ rename(fname, to);
}
if (storelog_fd > -1)
- file_close(storelog_fd);
+ file_close(storelog_fd);
storelog_fd = file_open(getStoreLogFile(), NULL, O_WRONLY | O_APPEND | O_CREAT);
}
-