/*
- * $Id: CacheDigest.cc,v 1.21 1998/05/14 16:33:47 wessels Exp $
+ * $Id: CacheDigest.cc,v 1.22 1998/05/22 23:43:48 wessels Exp $
*
* DEBUG: section 70 Cache Digest
* AUTHOR: Alex Rousskov
#endif
static void
-cacheDigestHashKey(const CacheDigest * cd, const cache_key *key)
+cacheDigestHashKey(const CacheDigest * cd, const cache_key * key)
{
const unsigned int bit_count = cd->mask_size * 8;
unsigned int tmp_keys[4];
storeKeyText(key), bit_count,
hashed_keys[0], hashed_keys[1], hashed_keys[2], hashed_keys[3]);
}
-
+
/*
- * $Id: HttpBody.cc,v 1.9 1998/04/24 07:09:27 wessels Exp $
+ * $Id: HttpBody.cc,v 1.10 1998/05/22 23:43:49 wessels Exp $
*
* DEBUG: section 56 HTTP Message Body
* AUTHOR: Alex Rousskov
/*
- * $Id: HttpHdrCc.cc,v 1.10 1998/05/11 18:44:25 rousskov Exp $
+ * $Id: HttpHdrCc.cc,v 1.11 1998/05/22 23:43:50 wessels Exp $
*
* DEBUG: section 65 HTTP Cache Control Header
* AUTHOR: Alex Rousskov
static int CcParsedCount = 0;
/* local prototypes */
-static int httpHdrCcParseInit(HttpHdrCc * cc, const String *str);
+static int httpHdrCcParseInit(HttpHdrCc * cc, const String * str);
/* module initialization */
/* creates an cc object from a 0-terminating string */
HttpHdrCc *
-httpHdrCcParseCreate(const String *str)
+httpHdrCcParseCreate(const String * str)
{
HttpHdrCc *cc = httpHdrCcCreate();
if (!httpHdrCcParseInit(cc, str)) {
/* parses a 0-terminating string and inits cc */
static int
-httpHdrCcParseInit(HttpHdrCc * cc, const String *str)
+httpHdrCcParseInit(HttpHdrCc * cc, const String * str)
{
const char *item;
const char *p; /* '=' parameter */
if (flag == CC_MAX_AGE && cc->max_age >= 0) {
packerPrintf(p, "max-age=%d", (int) cc->max_age);
pcount++;
- } else
- if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) {
+ } else if (EBIT_TEST(cc->mask, flag) && flag != CC_OTHER) {
packerPrintf(p, (pcount ? ", %s" : "%s"), strBuf(CcFieldsInfo[flag].name));
pcount++;
}
/*
- * $Id: HttpHdrRange.cc,v 1.7 1998/05/11 18:44:25 rousskov Exp $
+ * $Id: HttpHdrRange.cc,v 1.8 1998/05/22 23:43:51 wessels Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
}
HttpHdrRange *
-httpHdrRangeParseCreate(const String *str)
+httpHdrRangeParseCreate(const String * str)
{
HttpHdrRange *r = httpHdrRangeCreate();
if (!httpHdrRangeParseInit(r, str)) {
/* returns true if ranges are valid; inits HttpHdrRange */
int
-httpHdrRangeParseInit(HttpHdrRange * range, const String *str)
+httpHdrRangeParseInit(HttpHdrRange * range, const String * str)
{
const char *item;
const char *pos = NULL;
if (strNCaseCmp(*str, "bytes=", 6))
return 0;
/* skip "bytes="; hack! */
- pos = strBuf(*str)+5;
+ pos = strBuf(*str) + 5;
/* iterate through comma separated list */
while (strListGetItem(str, ',', &item, &ilen, &pos)) {
HttpHdrRangeSpec *spec = httpHdrRangeSpecParseCreate(item, ilen);
/*
- * $Id: HttpHeader.cc,v 1.35 1998/05/21 00:01:28 wessels Exp $
+ * $Id: HttpHeader.cc,v 1.36 1998/05/22 23:43:52 wessels Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
{"Accept-Ranges", HDR_ACCEPT_RANGES, ftStr},
{"Age", HDR_AGE, ftInt},
{"Age", HDR_ALLOW, ftStr},
- {"Authorization", HDR_AUTHORIZATION, ftStr}, /* for now */
+ {"Authorization", HDR_AUTHORIZATION, ftStr}, /* for now */
{"Cache-Control", HDR_CACHE_CONTROL, ftPCc},
{"Connection", HDR_CONNECTION, ftStr}, /* for now */
{"Content-Encoding", HDR_CONTENT_ENCODING, ftStr},
/* HDR_TRANSFER_ENCODING, */
HDR_UPGRADE,
HDR_VARY,
- HDR_VIA,
+ HDR_VIA,
/* HDR_WARNING, */
HDR_WWW_AUTHENTICATE,
/* HDR_EXPECT, HDR_TE, HDR_TRAILER */
/* only fields from ListHeaders array can be "listed" */
assert(CBIT_TEST(ListHeadersMask, id));
if (!CBIT_TEST(hdr->mask, id))
- return s;
+ return s;
while ((e = httpHeaderGetEntry(hdr, &pos))) {
if (e->id == id)
strListAdd(&s, strBuf(e->value), ',');
}
void
-httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc *cc)
+httpHeaderPutCc(HttpHeader * hdr, const HttpHdrCc * cc)
{
MemBuf mb;
Packer p;
int l;
assert(hdr && authScheme);
field = httpHeaderGetStr(hdr, id);
- if (!field) /* no authorization field */
+ if (!field) /* no authorization field */
return NULL;
l = strlen(authScheme);
- if (!l || strncasecmp(field, authScheme, l)) /* wrong scheme */
+ if (!l || strncasecmp(field, authScheme, l)) /* wrong scheme */
return NULL;
field += l;
- if (!isspace(*field)) /* wrong scheme */
+ if (!isspace(*field)) /* wrong scheme */
return NULL;
/* skip white space */
field += xcountws(field);
- if (!*field) /* no authorization cookie */
+ if (!*field) /* no authorization cookie */
return NULL;
return base64_decode(field);
}
/*
- * $Id: HttpHeaderTools.cc,v 1.12 1998/05/21 00:57:35 rousskov Exp $
+ * $Id: HttpHeaderTools.cc,v 1.13 1998/05/22 23:43:53 wessels Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
* note: if HDR_PROXY_CONNECTION is present we ignore HDR_CONNECTION
*/
int
-httpHeaderHasConnDir(const HttpHeader *hdr, const char *directive)
+httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive)
{
if (httpHeaderHas(hdr, HDR_PROXY_CONNECTION)) {
const char *str = httpHeaderGetStr(hdr, HDR_PROXY_CONNECTION);
/* returns true iff "m" is a member of the list */
int
-strListIsMember(const String *list, const char *m, char del)
+strListIsMember(const String * list, const char *m, char del)
{
const char *pos = NULL;
const char *item;
/* returns true iff "s" is a substring of a member of the list */
int
-strListIsSubstr(const String *list, const char *s, char del)
+strListIsSubstr(const String * list, const char *s, char del)
{
const char *pos = NULL;
const char *item;
/* appends an item to the list */
void
-strListAdd(String *str, const char *item, char del)
+strListAdd(String * str, const char *item, char del)
{
assert(str && item);
if (strLen(*str))
* init pos with NULL to start iteration.
*/
int
-strListGetItem(const String *str, char del, const char **item, int *ilen, const char **pos)
+strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos)
{
size_t len;
assert(str && item && pos);
/*
- * $Id: HttpReply.cc,v 1.23 1998/05/22 23:13:44 wessels Exp $
+ * $Id: HttpReply.cc,v 1.24 1998/05/22 23:43:54 wessels Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
blk_start = parse_start, blk_end = blk_start + strlen(blk_start);
else
return 0;
- }
+ }
if (!httpHeaderParse(&rep->header, blk_start, blk_end))
return httpReplyParseError(rep);
* return false if it is a browser connection. If there is a
* VIA header, then we assume this is NOT a browser connection.
*/
- const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
+ const char *agent = httpHeaderGetStr(hdr, HDR_USER_AGENT);
if (agent && !httpHeaderHas(hdr, HDR_VIA)) {
if (!strncasecmp(agent, "Mozilla/3.", 10))
return 0;
if (!strncasecmp(agent, "Netscape/3.", 11))
- return 0;
+ return 0;
}
/* for old versions of HTTP: persistent if has "keep-alive" */
return httpHeaderHasConnDir(hdr, "keep-alive");
/*
- * $Id: HttpRequest.cc,v 1.3 1998/05/11 20:56:06 rousskov Exp $
+ * $Id: HttpRequest.cc,v 1.4 1998/05/22 23:43:56 wessels Exp $
*
* DEBUG: section 73 HTTP Request
* AUTHOR: Duane Wessels
request_t *
requestCreate(method_t method, protocol_t protocol, const char *urlpath)
{
- request_t * req = memAllocate(MEM_REQUEST_T);
+ request_t *req = memAllocate(MEM_REQUEST_T);
req->method = method;
req->protocol = protocol;
if (urlpath)
}
int
-httpRequestParseHeader(request_t *req, const char *parse_start)
+httpRequestParseHeader(request_t * req, const char *parse_start)
{
const char *blk_start, *blk_end;
if (!httpMsgIsolateHeaders(&parse_start, &blk_start, &blk_end))
}
void
-httpRequestSetHeaders(request_t *req, method_t method, const char *uri, const char *header_str)
+httpRequestSetHeaders(request_t * req, method_t method, const char *uri, const char *header_str)
{
MemBuf mb;
assert(req && uri && header_str);
req->prefix = xstrdup(mb.buf);
req->prefix_sz = mb.size;
memBufClean(&mb);
- httpHeaderParse(&req->header, header_str, header_str+strlen(header_str));
+ httpHeaderParse(&req->header, header_str, header_str + strlen(header_str));
}
/* returns true if header is allowed to be passed on */
int
-httpRequestHdrAllowed(const HttpHeaderEntry *e, String *strConn)
+httpRequestHdrAllowed(const HttpHeaderEntry * e, String * strConn)
{
assert(e);
/* check connection header first */
/* check with anonymizer tables */
if (Config.onoff.anonymizer == ANONYMIZER_PARANOID) {
return httpAnonHdrAllowed(e->id);
- } else
- if (Config.onoff.anonymizer == ANONYMIZER_STANDARD) {
+ } else if (Config.onoff.anonymizer == ANONYMIZER_STANDARD) {
return !httpAnonHdrDenied(e->id);
}
return 1;
}
-
+
/*
- * $Id: HttpStatusLine.cc,v 1.10 1998/05/02 06:40:23 wessels Exp $
+ * $Id: HttpStatusLine.cc,v 1.11 1998/05/22 23:43:56 wessels Exp $
*
* DEBUG: section 57 HTTP Status-line
* AUTHOR: Alex Rousskov
/*
- * $Id: MemBuf.cc,v 1.8 1998/05/11 18:44:30 rousskov Exp $
+ * $Id: MemBuf.cc,v 1.9 1998/05/22 23:43:57 wessels Exp $
*
* DEBUG: section 59 auto-growing Memory Buffer with printf
* AUTHOR: Alex Rousskov
mb->buf = xmalloc(new_cap);
mb->freefunc = &xfree;
} else {
- assert(mb->freefunc == &xfree); /* for now */
+ assert(mb->freefunc == &xfree); /* for now */
mb->buf = xrealloc(mb->buf, new_cap);
}
memset(mb->buf + mb->size, 0, new_cap - mb->size); /* just in case */
+
/*
- * $Id: client.cc,v 1.67 1998/05/15 20:02:10 wessels Exp $
+ * $Id: client.cc,v 1.68 1998/05/22 23:43:59 wessels Exp $
*
* DEBUG: section 0 WWW Client
* AUTHOR: Harvest Derived
/*
- * $Id: client_side.cc,v 1.312 1998/05/21 23:14:05 wessels Exp $
+ * $Id: client_side.cc,v 1.313 1998/05/22 23:44:00 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
if (request->port == Config.Port.http->i)
http->flags.internal = 1;
} else if (internalStaticCheck(strBuf(request->urlpath))) {
- xstrncpy(request->host, getMyHostname(), SQUIDHOSTNAMELEN);
- request->port = Config.Port.http->i;
- http->flags.internal = 1;
+ xstrncpy(request->host, getMyHostname(), SQUIDHOSTNAMELEN);
+ request->port = Config.Port.http->i;
+ http->flags.internal = 1;
}
}
}
/*
- * $Id: disk.cc,v 1.115 1998/05/22 21:11:47 wessels Exp $
+ * $Id: disk.cc,v 1.116 1998/05/22 23:44:03 wessels Exp $
*
* DEBUG: section 6 Disk I/O Routines
* AUTHOR: Harvest Derived
assert(fdd->write_q->len > fdd->write_q->buf_offset);
#if USE_ASYNC_IO
aioWrite(fd,
- -1, /* seek offset, -1 == append */
+ -1, /* seek offset, -1 == append */
fdd->write_q->buf + fdd->write_q->buf_offset,
fdd->write_q->len - fdd->write_q->buf_offset,
diskHandleWriteComplete,
/*
- * $Id: filemap.cc,v 1.27 1998/05/22 23:42:12 wessels Exp $
+ * $Id: filemap.cc,v 1.28 1998/05/22 23:44:04 wessels Exp $
*
* DEBUG: section 8 Swap File Bitmap
* AUTHOR: Harvest Derived
fm->toggle++;
debug(8, 0) ("WARNING: filemap utilization at %d%%\n"
"\tConsider decreasing store_avg_object_size in squid.conf\n",
- percent(fm->n_files_in_map, fm->max_n_files));
+ percent(fm->n_files_in_map, fm->max_n_files));
} else if (fm->n_files_in_map > (fm->max_n_files - 100)) {
fatal_dump("You've run out of swap file numbers.");
}
+
/*
- * $Id: fqdncache.cc,v 1.102 1998/05/15 15:16:21 wessels Exp $
+ * $Id: fqdncache.cc,v 1.103 1998/05/22 23:44:05 wessels Exp $
*
* DEBUG: section 35 FQDN Cache
* AUTHOR: Harvest Derived
/*
- * $Id: ftp.cc,v 1.225 1998/05/21 07:05:38 wessels Exp $
+ * $Id: ftp.cc,v 1.226 1998/05/22 23:44:07 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
} ftp_state_t;
struct _ftp_flags {
- int isdir:1;
- int pasv_supported:1;
- int skip_whitespace:1;
- int rest_supported:1;
- int pasv_only:1;
- int authenticated:1;
- int http_header_sent:1;
- int tried_nlst:1;
- int use_base:1;
- int root_dir:1;
- int no_dotdot:1;
- int html_header_sent:1;
- int binary:1;
- int try_slash_hack:1;
- int put:1;
- int put_mkdir:1;
- int listformat_unknown:1;
- int datachannel_hack:1;
+ int isdir:1;
+ int pasv_supported:1;
+ int skip_whitespace:1;
+ int rest_supported:1;
+ int pasv_only:1;
+ int authenticated:1;
+ int http_header_sent:1;
+ int tried_nlst:1;
+ int use_base:1;
+ int root_dir:1;
+ int no_dotdot:1;
+ int html_header_sent:1;
+ int binary:1;
+ int try_slash_hack:1;
+ int put:1;
+ int put_mkdir:1;
+ int listformat_unknown:1;
+ int datachannel_hack:1;
};
typedef struct _Ftpdata {
while (*end != '\r' && *end != '\n' && end > sbuf)
end--;
usable = end - sbuf;
- debug(9,3)("ftpParseListing: usable = %d\n", usable);
+ debug(9, 3) ("ftpParseListing: usable = %d\n", usable);
if (usable == 0) {
debug(9, 3) ("ftpParseListing: didn't find end for %s\n", storeUrl(e));
xfree(sbuf);
* Return 0 if something is missing.
*/
static int
-ftpCheckAuth(FtpStateData * ftpState, const HttpHeader *req_hdr)
+ftpCheckAuth(FtpStateData * ftpState, const HttpHeader * req_hdr)
{
char *orig_user;
const char *auth;
/*
- * $Id: http.cc,v 1.273 1998/05/21 22:01:08 wessels Exp $
+ * $Id: http.cc,v 1.274 1998/05/22 23:44:12 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
httpBuildRequestHeader(request_t * request,
request_t * orig_request,
StoreEntry * entry,
- HttpHeader *hdr_out,
+ HttpHeader * hdr_out,
int cfd,
int flags)
{
/* building buffer for complex strings */
- #define BBUF_SZ (MAX_URL+32)
+#define BBUF_SZ (MAX_URL+32)
LOCAL_ARRAY(char, bbuf, BBUF_SZ);
String strConnection = StringNull;
const HttpHeader *hdr_in = &orig_request->header;
assert(orig_request->prefix != NULL);
debug(11, 3) ("httpBuildRequestHeader:\n%s", orig_request->prefix);
httpHeaderInit(hdr_out);
-
+
/* append our IMS header */
if (entry && entry->lastmod && request->method == METHOD_GET)
httpHeaderPutTime(hdr_out, HDR_IF_MODIFIED_SINCE, entry->lastmod);
/* sacrificing efficiency over clarity, etc. */
const int hops = httpHeaderGetInt(hdr_in, HDR_MAX_FORWARDS);
if (hops > 0)
- httpHeaderPutInt(hdr_out, HDR_MAX_FORWARDS, hops-1);
+ httpHeaderPutInt(hdr_out, HDR_MAX_FORWARDS, hops - 1);
}
break;
case HDR_PROXY_CONNECTION:
httpBuildRequestPrefix(request_t * request,
request_t * orig_request,
StoreEntry * entry,
- MemBuf *mb,
+ MemBuf * mb,
int cfd,
int flags)
{
{
const char *upath = strBuf(request->urlpath);
debug(0, 1) ("internalStart: %s requesting '%s'\n",
- inet_ntoa(request->client_addr), upath);
+ inet_ntoa(request->client_addr), upath);
if (0 == strcmp(upath, "/squid-internal-dynamic/netdb"))
netdbBinaryExchange(entry);
else
- debug(0,0)("internalStart: unknown request '%s'\n", upath);
+ debug(0, 0) ("internalStart: unknown request '%s'\n", upath);
}
int
internalCheck(const char *urlpath)
{
- return (0 == strncmp(urlpath, "/squid-internal-", 16));
+ return (0 == strncmp(urlpath, "/squid-internal-", 16));
}
int
internalStaticCheck(const char *urlpath)
{
- return (0 == strncmp(urlpath, "/squid-internal-static", 22));
+ return (0 == strncmp(urlpath, "/squid-internal-static", 22));
}
/*
/*
- * $Id: mem.cc,v 1.23 1998/05/12 20:16:34 wessels Exp $
+ * $Id: mem.cc,v 1.24 1998/05/22 23:44:15 wessels Exp $
*
* DEBUG: section 13 High Level Memory Pool Management
* AUTHOR: Harvest Derived
/* test that all entries are initialized */
for (t = MEM_NONE + 1; t < MEM_MAX; t++) {
if (MEM_DONTFREE == t)
- continue;
+ continue;
/*
* If you hit this assertion, then you forgot to add a
* memDataInit() line for type 't' above.
/*
- * $Id: neighbors.cc,v 1.214 1998/05/21 06:41:55 wessels Exp $
+ * $Id: neighbors.cc,v 1.215 1998/05/22 23:44:17 wessels Exp $
*
* DEBUG: section 15 Neighbor Routines
* AUTHOR: Harvest Derived
memset(&name, '\0', sizeof(struct sockaddr_in));
if (getsockname(fd, (struct sockaddr *) &name, &len) < 0)
debug(15, 1) ("getsockname(%d,%p,%p) failed.\n", fd, &name, &len);
- peerRefreshDNS((void *)1);
+ peerRefreshDNS((void *) 1);
if (0 == echo_hdr.opcode) {
echo_hdr.opcode = ICP_SECHO;
echo_hdr.version = ICP_VERSION_CURRENT;
if (p->type == PEER_MULTICAST)
peerCountMcastPeersSchedule(p, 10);
if (p->type != PEER_MULTICAST)
- eventAddIsh("netdbExchangeStart", netdbExchangeStart, p, 30.0, 1);
+ eventAddIsh("netdbExchangeStart", netdbExchangeStart, p, 30.0, 1);
}
static void
peer *p = NULL;
if (!data && 0 == stat5minClientRequests()) {
/* no recent client traffic, wait a bit */
- eventAddIsh("peerRefreshDNS", peerRefreshDNS, NULL, 180.0, 1);
+ eventAddIsh("peerRefreshDNS", peerRefreshDNS, NULL, 180.0, 1);
return;
}
for (p = Config.peers; p; p = p->next)
/*
- * $Id: net_db.cc,v 1.105 1998/05/21 03:48:19 wessels Exp $
+ * $Id: net_db.cc,v 1.106 1998/05/22 23:44:19 wessels Exp $
*
* DEBUG: section 37 Network Measurement Database
* AUTHOR: Duane Wessels
}
peer *
-netdbClosestParent(request_t *request)
+netdbClosestParent(request_t * request)
{
#if USE_ICMP
peer *p = NULL;
if (n->rtt < h->rtt)
break;
p = peerFindByName(h->peername);
- if (NULL == p) /* not found */
+ if (NULL == p) /* not found */
continue;
if (!peerHTTPOkay(p, request)) /* not allowed */
continue;
/*
- * $Id: pconn.cc,v 1.15 1998/05/22 23:07:39 wessels Exp $
+ * $Id: pconn.cc,v 1.16 1998/05/22 23:44:20 wessels Exp $
*
* DEBUG: section 48 Persistent Connections
* AUTHOR: Duane Wessels
struct _pconn *p;
LOCAL_ARRAY(char, key, SQUIDHOSTNAMELEN + 10);
LOCAL_ARRAY(char, desc, FD_DESC_SZ);
- if (fdNFree() < (RESERVED_FD<<2)) {
+ if (fdNFree() < (RESERVED_FD << 2)) {
debug(48, 3) ("pconnPush: Not many unused FDs\n");
comm_close(fd);
return;
extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
extern void strListAdd(String * str, const char *item, char del);
extern int strListIsMember(const String * str, const char *item, char del);
-extern int strListIsSubstr(const String *list, const char *s, char del);
+extern int strListIsSubstr(const String * list, const char *s, char del);
extern int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
extern const char *getStringPrefix(const char *str, const char *end);
extern int httpHeaderParseInt(const char *start, int *val);
/*
- * $Id: ssl.cc,v 1.78 1998/05/21 22:01:08 wessels Exp $
+ * $Id: ssl.cc,v 1.79 1998/05/22 23:44:24 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
memBufPrintf(&mb, "CONNECT %s HTTP/1.0\r\n", sslState->url);
httpBuildRequestHeader(sslState->request,
sslState->request,
- NULL, /* StoreEntry */
+ NULL, /* StoreEntry */
&hdr_out,
sslState->client.fd,
- 0); /* flags */
+ 0); /* flags */
packerToMemInit(&p, &mb);
httpHeaderPackInto(&hdr_out, &p);
httpHeaderClean(&hdr_out);
/*
- * $Id: stat.cc,v 1.252 1998/05/22 23:42:58 wessels Exp $
+ * $Id: stat.cc,v 1.253 1998/05/22 23:44:26 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
int
stat5minClientRequests(void)
{
- assert(N_COUNT_HIST > 5);
- return Counter.client_http.requests - CountHist[5].client_http.requests;
+ assert(N_COUNT_HIST > 5);
+ return Counter.client_http.requests - CountHist[5].client_http.requests;
}
/*
- * $Id: store.cc,v 1.416 1998/05/21 22:23:59 wessels Exp $
+ * $Id: store.cc,v 1.417 1998/05/22 23:44:29 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
prev = m->prev;
e = m->data;
if (storeEntryLocked(e)) {
- dlinkDelete(m, &inmem_list);
- dlinkAdd(e, m, &inmem_list);
+ dlinkDelete(m, &inmem_list);
+ dlinkAdd(e, m, &inmem_list);
continue;
}
released++;
if (fd < 0) {
storeReleaseRequest(e);
} else {
- debug(20, 5) ("storeSwapInFileOpened: initialized '%s' for '%s'\n",
+ debug(20, 5) ("storeSwapInFileOpened: initialized '%s' for '%s'\n",
ctrlp->path, storeUrl(e));
}
(ctrlp->callback) (fd, ctrlp->callback_data);
+
struct _acl_ip_data {
struct in_addr addr1; /* if addr2 non-zero then its a range */
struct in_addr addr2;
/*
- * $Id: tunnel.cc,v 1.78 1998/05/21 22:01:08 wessels Exp $
+ * $Id: tunnel.cc,v 1.79 1998/05/22 23:44:24 wessels Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
memBufPrintf(&mb, "CONNECT %s HTTP/1.0\r\n", sslState->url);
httpBuildRequestHeader(sslState->request,
sslState->request,
- NULL, /* StoreEntry */
+ NULL, /* StoreEntry */
&hdr_out,
sslState->client.fd,
- 0); /* flags */
+ 0); /* flags */
packerToMemInit(&p, &mb);
httpHeaderPackInto(&hdr_out, &p);
httpHeaderClean(&hdr_out);
/*
- * $Id: url.cc,v 1.93 1998/05/20 20:46:50 wessels Exp $
+ * $Id: url.cc,v 1.94 1998/05/22 23:44:34 wessels Exp $
*
* DEBUG: section 23 URL Parsing
* AUTHOR: Duane Wessels
return buf;
}
-#if OLD_CODE /* moved to HttpRequest.c */
+#if OLD_CODE /* moved to HttpRequest.c */
request_t *
requestLink(request_t * request)
{
/*
* Quick-n-dirty host extraction from a URL. Steps:
- * Look for a colon
- * Skip any '/' after the colon
- * Copy the next SQUID_MAXHOSTNAMELEN bytes to host[]
- * Look for an ending '/' or ':' and terminate
- * Look for login info preceeded by '@'
+ * Look for a colon
+ * Skip any '/' after the colon
+ * Copy the next SQUID_MAXHOSTNAMELEN bytes to host[]
+ * Look for an ending '/' or ':' and terminate
+ * Look for login info preceeded by '@'
*/
char *
urlHostname(const char *url)
*t = '\0';
if ((t = strrchr(host, '@'))) {
t++;
- xmemmove(host, t, strlen(t)+1);
+ xmemmove(host, t, strlen(t) + 1);
}
return host;
}