--------------------- PatchSet 5977 Date: 2003/10/17 15:01:47 Author: dwsquid Branch: icap-2_5 Tag: (none) Log: gindent-1.9.1 -br -ce -i4 -ci4 -l80 -nlp -npcs -npsl -d0 -sc -di0 -psl Members: src/icap_common.c:1.1.2.10->1.1.2.11 src/icap_reqmod.c:1.1.2.3->1.1.2.4 src/icap_respmod.c:1.1.2.6->1.1.2.7 src/protos.h:1.41.6.13.2.10->1.41.6.13.2.11 Index: squid/src/icap_common.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_common.c,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -u -r1.1.2.10 -r1.1.2.11 --- squid/src/icap_common.c 15 Oct 2003 22:21:28 -0000 1.1.2.10 +++ squid/src/icap_common.c 17 Oct 2003 15:01:47 -0000 1.1.2.11 @@ -1,5 +1,5 @@ /* - * $Id: icap_common.c,v 1.1.2.10 2003/10/15 22:21:28 dwsquid Exp $ + * $Id: icap_common.c,v 1.1.2.11 2003/10/17 15:01:47 dwsquid Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -63,17 +63,17 @@ int icapFindHeader(const char *buf, const char *hdr, const char **Start, const char **End) { - const char *start = NULL; - const char *end = NULL; - start = strstr(buf, hdr); - if (NULL == start) - return 0; - end = start + strcspn(start, "\r\n"); - if (NULL == end) - return 0; - *Start = start; - *End = end; - return 1; + const char *start = NULL; + const char *end = NULL; + start = strstr(buf, hdr); + if (NULL == start) + return 0; + end = start + strcspn(start, "\r\n"); + if (NULL == end) + return 0; + *Start = start; + *End = end; + return 1; } /* @@ -399,25 +399,25 @@ static int icapParseConnectionClose(const IcapStateData * icap, const char *s, const char *e) { - if (strnstr(s, "close", e-s)) { - return 1; - } - return 0; + if (strnstr(s, "close", e - s)) { + return 1; + } + return 0; } void icapSetKeepAlive(IcapStateData * icap, const char *hdrs) { - const char *start; - const char *end; - if (0 == icap->flags.keep_alive) - return; - if (0 == icapFindHeader(hdrs, "Connection:", &start, &end)) { - icap->flags.keep_alive = 1; - return; - } - if (icapParseConnectionClose(icap, start, end)) - icap->flags.keep_alive = 0; - else - icap->flags.keep_alive = 1; + const char *start; + const char *end; + if (0 == icap->flags.keep_alive) + return; + if (0 == icapFindHeader(hdrs, "Connection:", &start, &end)) { + icap->flags.keep_alive = 1; + return; + } + if (icapParseConnectionClose(icap, start, end)) + icap->flags.keep_alive = 0; + else + icap->flags.keep_alive = 1; } Index: squid/src/icap_reqmod.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_reqmod.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/src/icap_reqmod.c 15 Oct 2003 20:01:24 -0000 1.1.2.3 +++ squid/src/icap_reqmod.c 17 Oct 2003 15:01:48 -0000 1.1.2.4 @@ -1,5 +1,5 @@ /* - * $Id: icap_reqmod.c,v 1.1.2.3 2003/10/15 20:01:24 dwsquid Exp $ + * $Id: icap_reqmod.c,v 1.1.2.4 2003/10/17 15:01:48 dwsquid Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -361,8 +361,8 @@ return; }; icapSetKeepAlive(icap, icap_header); - if (icapFindHeader(icap_header, "Encapsulated:", &start, &end)) { - icapParseEncapsulated(icap, start, end); + if (icapFindHeader(icap_header, "Encapsulated:", &start, &end)) { + icapParseEncapsulated(icap, start, end); } else { debug(81, 1) ("WARNING: icapReqModReadIcapPart() did not find 'Encapsulated' header\n"); } Index: squid/src/icap_respmod.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_respmod.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -r1.1.2.6 -r1.1.2.7 --- squid/src/icap_respmod.c 15 Oct 2003 20:01:24 -0000 1.1.2.6 +++ squid/src/icap_respmod.c 17 Oct 2003 15:01:48 -0000 1.1.2.7 @@ -1,5 +1,5 @@ /* - * $Id: icap_respmod.c,v 1.1.2.6 2003/10/15 20:01:24 dwsquid Exp $ + * $Id: icap_respmod.c,v 1.1.2.7 2003/10/17 15:01:48 dwsquid Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -781,7 +781,7 @@ return 0; } if (icap->flags.no_content) { - debug(81, 5) ("icapPconnTransferDone: no content, ret 1\n"); + debug(81, 5) ("icapPconnTransferDone: no content, ret 1\n"); return 1; } if (icap->chunk_size != -2) { @@ -920,7 +920,7 @@ icap->http_header_bytes_read_so_far = so_far; } debug(81, 3) ("%s:%d: len=%d\n", __FILE__, __LINE__, (int) len); - debug(81, 3) ("%s:%d: flags.no_content=%d\n", __FILE__, __LINE__, icap->flags.no_content ); + debug(81, 3) ("%s:%d: flags.no_content=%d\n", __FILE__, __LINE__, icap->flags.no_content); if (icap->flags.no_content) { /* data from http.c is not chunked */ storeAppend(entry, buf, len); Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.41.6.13.2.10 retrieving revision 1.41.6.13.2.11 diff -u -r1.41.6.13.2.10 -r1.41.6.13.2.11 --- squid/src/protos.h 15 Oct 2003 20:01:25 -0000 1.41.6.13.2.10 +++ squid/src/protos.h 17 Oct 2003 15:01:48 -0000 1.41.6.13.2.11 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.41.6.13.2.10 2003/10/15 20:01:25 dwsquid Exp $ + * $Id: protos.h,v 1.41.6.13.2.11 2003/10/17 15:01:48 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1363,7 +1363,7 @@ int icapCheckAcl(clientHttpRequest *); size_t icapLineLength(const char *, int); int icapResponsePeek(int, IcapStateData *, PF, int *); -int icapFindHeader(const char *, const char *, const char **, const char**); +int icapFindHeader(const char *, const char *, const char **, const char **); int icapParseKeepAlive(const IcapStateData *, const char *, const char *); void icapSetKeepAlive(IcapStateData * icap, const char *hdrs);