+++ /dev/null
-Index: squid/src/auth/basic/auth_basic.c
-diff -c squid/src/auth/basic/auth_basic.c:1.14.2.2 squid/src/auth/basic/auth_basic.c:1.14.2.3
-*** squid/src/auth/basic/auth_basic.c:1.14.2.2 Wed Jan 8 13:59:02 2003
---- squid/src/auth/basic/auth_basic.c Sun Aug 10 12:53:38 2003
-***************
-*** 212,218 ****
- case 2: /* paused while waiting for a username:password check on another request */
- return -1;
- case 3: /* authentication process failed. */
-! return -2;
- }
- return -2;
- }
---- 212,218 ----
- case 2: /* paused while waiting for a username:password check on another request */
- return -1;
- case 3: /* authentication process failed. */
-! return 0;
- }
- return -2;
- }
+++ /dev/null
-Index: squid/errors/Spanish/ERR_TOO_BIG
-diff -c squid/errors/Spanish/ERR_TOO_BIG:1.1.6.3 squid/errors/Spanish/ERR_TOO_BIG:1.1.6.4
-*** squid/errors/Spanish/ERR_TOO_BIG:1.1.6.3 Wed Aug 28 15:08:14 2002
---- squid/errors/Spanish/ERR_TOO_BIG Mon Jul 7 01:49:55 2003
-***************
-*** 1,28 ****
-! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-! <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-! <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
-! <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
- </HEAD><BODY>
- <H1>ERROR</H1>
-! <H2>The requested URL could not be retrieved</H2>
-! <HR noshade size="1px">
- <P>
-! While trying to retrieve the URL:
- <A HREF="%U">%U</A>
- <P>
-! The following error was encountered:
- <UL>
- <LI>
- <STRONG>
-! The request or reply is too large.
- </STRONG>
- <P>
-! If you are making a POST or PUT request, then your request body
-! (the thing you are trying to upload) is too large. If you are
-! making a GET request, then the reply body (what you are trying
-! to download) is too large. These limits have been established
-! by the Internet Service Provider who operates this cache. Please
-! contact them directly if you feel this is an error.
- </UL>
- <P>
-! Your cache administrator is <A HREF="mailto:%w">%w</A>.
---- 1,27 ----
-! <HTML><HEAD>
-! <TITLE>ERROR: La dirección solicitada no puede ser obtenida</TITLE>
- </HEAD><BODY>
- <H1>ERROR</H1>
-! <H2>La dirección solicitada no puede ser obtenida</H2>
-! <HR>
- <P>
-! Mientras se descargaba la dirección:
- <A HREF="%U">%U</A>
- <P>
-! Se encontró el siguiente error:
- <UL>
- <LI>
- <STRONG>
-! La dirección solicitada es demasiado larga.
- </STRONG>
- <P>
-! Si está haciendo una petición POST o PUT, el cuerpo (lo
-! que está intentando subir) es demasiado grande. Si está
-! haciendo una petición GET, entonces el cuerpo de la respuesta
-! (que está tratando de bajar) es demasiado grande. Estos
-! límites fueron establecidos por el Proveedor de Servicios de
-! Internet que opera este caché. Por favor, contacte con él
-! directamente si cree que esto es un error.
- </UL>
- <P>
-! Su administrdor del caché es <A HREF="mailto:%w">%w</A>.
+++ /dev/null
-Index: squid/src/HttpHeaderTools.c
-diff -c squid/src/HttpHeaderTools.c:1.32.2.1 squid/src/HttpHeaderTools.c:1.32.2.2
-*** squid/src/HttpHeaderTools.c:1.32.2.1 Tue May 20 17:51:15 2003
---- squid/src/HttpHeaderTools.c Mon May 26 06:14:27 2003
-***************
-*** 244,254 ****
- strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos)
- {
- size_t len;
-! char delim[2][3] =
- {
-! {'"', del, 0},
- {'"', '\\', 0}};
- int quoted = 0;
- assert(str && item && pos);
- if (*pos) {
- if (!**pos) /* end of string */
---- 244,255 ----
- strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos)
- {
- size_t len;
-! static char delim[2][3] =
- {
-! {'"', 0, 0},
- {'"', '\\', 0}};
- int quoted = 0;
-+ delim[0][1] = del;
- assert(str && item && pos);
- if (*pos) {
- if (!**pos) /* end of string */
+++ /dev/null
-Index: squid/errors/Makefile.am
-diff -c squid/errors/Makefile.am:1.5.2.4 squid/errors/Makefile.am:1.5.2.5
-*** squid/errors/Makefile.am:1.5.2.4 Fri Oct 18 15:22:11 2002
---- squid/errors/Makefile.am Sun May 25 07:47:45 2003
-***************
-*** 27,32 ****
---- 27,33 ----
- Italian \
- Japanese \
- Korean \
-+ Lithuanian \
- Polish \
- Portuguese \
- Romanian \
-Index: squid/errors/Makefile.in
-diff -c squid/errors/Makefile.in:1.15.2.8 squid/errors/Makefile.in:1.15.2.9
-*** squid/errors/Makefile.in:1.15.2.8 Tue Feb 11 19:02:09 2003
---- squid/errors/Makefile.in Sun May 25 07:56:20 2003
-***************
-*** 137,142 ****
---- 137,143 ----
- Italian \
- Japanese \
- Korean \
-+ Lithuanian \
- Polish \
- Portuguese \
- Romanian \
-Index: squid/errors/Lithuanian/ERR_ACCESS_DENIED
-diff -c /dev/null squid/errors/Lithuanian/ERR_ACCESS_DENIED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_ACCESS_DENIED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,24 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>KLAIDA</H1>
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>
-+ <HR noshade size="1px">
-+ <P>
-+ Bandant atsiøsti puslapá:
-+ <A HREF="%U">%U</A>
-+ <P>
-+ Gautas klaidos praneðimas:
-+ <UL>
-+ <LI>
-+ <STRONG>
-+ Priëjimas draudþiamas.
-+ </STRONG>
-+ <P>
-+ Priëjimo kontrolës konfiguracija ðiuo metu neleidþia atsiøsti jûsø
-+ nurodyto puslapio. Jei manote, kad tai yra neteisinga, galite susisiekti\r
-+ su jûsø Interneto paslaugø tiekëju.
-+ </UL>
-+ </P>
-Index: squid/errors/Lithuanian/ERR_CACHE_ACCESS_DENIED
-diff -c /dev/null squid/errors/Lithuanian/ERR_CACHE_ACCESS_DENIED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_CACHE_ACCESS_DENIED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,34 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: Priëjimas prie keðo uþdraustas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD>
-+ <BODY>
-+ <H1>KLAIDA</H1>
-+ <H2>Priëjimas prie keðo uþdraustas</H2>
-+ <HR noshade size="1px">
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Priëjimas prie keðo uþdraustas.
-+ </STRONG>
-+ </UL>
-+ </P>
-+
-+ <P>Atsipraðau, bet jûs ðiuo metu negalite vykdyti uþklausimo:
-+ <PRE> %U</PRE>
-+ per ðá serverá, kol jûs neprisistatysite.
-+ </P>
-+
-+ <P>
-+ Jums reikia Netscape v2.0 ar naujesnio, arba Microsoft Internet
-+ Explorer 3.0 ar naujesnio, arba kitos HTTP/1.1 suprantanèios perþiûros\r
-+ programos. Praðau susisiekti su <A HREF="mailto:%w">proxy \r
-+ administratoriumi</a>, jei jums kils sunkumai prisistatant arba
-+ <A HREF="http://%h/cgi-bin/chpasswd.cgi\">pakeisti</a> savo slaptaþodá.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED
-diff -c /dev/null squid/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_CACHE_MGR_ACCESS_DENIED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,36 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: Keðo menedþerio priëjimas uþdraustas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD>
-+ <BODY>
-+ <H1>KLAIDA</H1>
-+ <H2>Keðo menedþerio priëjimas uþdraustas</H2>
-+ <HR noshade size="1px">
-+ <P>
-+ Bandant atsiøsti puslapá:
-+ <A HREF="%U">%U</A>
-+ <P>
-+ Gautas klaidos praneðimas:
-+ <UL>
-+ <LI>
-+ <STRONG>
-+ Keðo menedþerio priëjimas uþdraustas.
-+ </STRONG>
-+ </UL>
-+ </P>
-+
-+ <P>Atsipraðiau, bet jûs negalite vykdyti uþklausimo:
-+ <PRE> %U</PRE>
-+ ðiam keðo menedþeriui, kol jûs neprisistatysite.
-+ </P>
-+
-+ <P> \r
-+ Jums reikia Netscape v2.0 ar naujesnio, arba Microsoft Internet\r
-+ Explorer 3.0 ar naujesnio, arba kitos HTTP/1.1 suprantanèios perþiûros\r
-+ programos. Praðau susisiekti su <A HREF="mailto:%w">administratoriumi</a>, \r
-+ jei jums iðkilo problemos prisistatant arba, jei jûs <em>esate</em>
-+ administratorius, perskaitykite Squid documentacijà dël keðo menedþerio \r
-+ interfeiso ir patikrinkite keðo þurnalà dël detalesniø praneðimø apie\r
-+ klaidas.\r
-+ </P>
-Index: squid/errors/Lithuanian/ERR_CANNOT_FORWARD
-diff -c /dev/null squid/errors/Lithuanian/ERR_CANNOT_FORWARD:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_CANNOT_FORWARD Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,29 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Ðiuo metu negaliu persiøsti uþklausimo.
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Uþklausimas negali bûti persiøstas á pagrindiná serverá arba kurá nors \r
-+ pagalbiná proxy serverá. Pagrindinës tokios klaidos prieþastys yra ðios:
-+ <UL>
-+ <LI>Proxy administratorius neleidþia serveriui kurti tiesioginiø
-+ susijungimø su serveriais, ir
-+ <LI>Visi pagalbiniai proxy serveriai ðiuo metu yra nepasiekiami.
-+ </UL>
-+ </P>
-Index: squid/errors/Lithuanian/ERR_CONNECT_FAIL
-diff -c /dev/null squid/errors/Lithuanian/ERR_CONNECT_FAIL:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_CONNECT_FAIL Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,28 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Ryðys neveikia
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Sistema atsakë:
-+ <PRE><I> %E</I></PRE>
-+
-+ <P>
-+ Nurodytas serveris arba tinklas yra atjungtas. \r
-+ Pabandykite vykdyti uþklausimà vëliau.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_DNS_FAIL
-diff -c /dev/null squid/errors/Lithuanian/ERR_DNS_FAIL:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_DNS_FAIL Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,33 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>
-+ <HR noshade size="1px">
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <BLOCKQUOTE>
-+ Neámanoma nustatyti <I>%H</I> serverio IP adreso
-+ </BLOCKQUOTE>
-+ </UL>
-+
-+ <P>
-+ DNS serveris atsakë:
-+ <BLOCKQUOTE>
-+ %z
-+ </BLOCKQUOTE>
-+
-+ <P>
-+ Tai reiðkia, kad:
-+ <PRE>
-+ Neámanoma aptikti serverio nurodytu adresu.
-+ Patikrinkite, ar teisingai ávedëte adresà.
-+ </PRE>
-+ </P>
-+
-Index: squid/errors/Lithuanian/ERR_FORWARDING_DENIED
-diff -c /dev/null squid/errors/Lithuanian/ERR_FORWARDING_DENIED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_FORWARDING_DENIED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,25 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Pervedimo komanda neleistina.
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Ðis keðas negali perkelti jûsø uþklausimo, kadangi jis bando sukurti
-+ sibling tipo ryðius. Gal bût klientas %i yra keðas, kuris klaidingai
-+ sukonfiguruotas.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_FTP_DISABLED
-diff -c /dev/null squid/errors/Lithuanian/ERR_FTP_DISABLED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_FTP_DISABLED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,23 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ FTP yra atjungtas
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Ðis proxy serveris nepalaiko FTP.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_FTP_FAILURE
-diff -c /dev/null squid/errors/Lithuanian/ERR_FTP_FAILURE:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_FTP_FAILURE Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,24 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>
-+ Ávyko FTP protokolo klaida
-+ bandant atsiusti puslapá:
-+ <A HREF="%U">%U</A>
-+ <P>
-+ Squid nusiuntë ðià FTP komandà:
-+ <blockquote><strong><pre>%f</pre></strong></blockquote>
-+ ir gavo ðá atsakymà:\r
-+ <blockquote><strong><pre>%F</pre></strong></blockquote>
-+ <blockquote><strong><pre>%g</pre></strong></blockquote>
-+ <P>
-+ Tai gali bûti sàlygota FTP adreso su pilnu keliu (kuris neatitinka
-+ RFC 1738 standarto). Jei taip atsitiko, tada duomenys gali bûti
-+ rasti <A HREF="%B">%B</A> adresu.
-+ </P>
-+
-Index: squid/errors/Lithuanian/ERR_FTP_PUT_CREATED
-diff -c /dev/null squid/errors/Lithuanian/ERR_FTP_PUT_CREATED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_FTP_PUT_CREATED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,11 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>FTP PUT operacija buvo sëkminga: Failas sukurtas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>Operacija buvo sëkminga</H1>
-+ <H2>Failas sukurtas</H2>
-+ <HR noshade size="1px">
-+ <P>
-+ </P>
-+
-Index: squid/errors/Lithuanian/ERR_FTP_PUT_ERROR
-diff -c /dev/null squid/errors/Lithuanian/ERR_FTP_PUT_ERROR:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_FTP_PUT_ERROR Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,27 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: FTP uploadas nepavyko</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>KLAIDA</H1>
-+ <H2>FTP PUT/uploadas nepavyko</H2>
-+ <HR noshade size="1px">
-+ <P>
-+ Bandydamas pakrauti dokumentà:
-+ <A HREF="%U">%U</A>
-+ <P>
-+ Squid nusiuntë ðià FTP komandà:
-+ <PRE><STRONG>
-+ %f
-+ </STRONG></PRE>
-+ ir gavo toká atsakymà:
-+ <PRE><STRONG>
-+ %F
-+ </STRONG></PRE>
-+ <P>
-+ Tai reiðkia:
-+ <PRE>
-+ Patikrinkite kelià, teises, disko talpà ir pabandykite dar kartà.
-+ </PRE>
-+ </P>
-+
-Index: squid/errors/Lithuanian/ERR_FTP_PUT_MODIFIED
-diff -c /dev/null squid/errors/Lithuanian/ERR_FTP_PUT_MODIFIED:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_FTP_PUT_MODIFIED Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,11 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>FTP PUT operacija sëkminga: Failas atnaujintas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>Operacija sëkminga</H1>
-+ <H2>Failas atnaujintas</H2>
-+ <HR noshade size="1px">
-+ <P>
-+ </P>
-+
-Index: squid/errors/Lithuanian/ERR_INVALID_REQ
-diff -c /dev/null squid/errors/Lithuanian/ERR_INVALID_REQ:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_INVALID_REQ Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,33 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>
-+ Bandant ávykdyti uþklausimà:
-+ <PRE>
-+ %R
-+ </PRE>
-+ <P>
-+ Gautas klaidos praneðimas:
-+ <UL>
-+ <LI>
-+ <STRONG>
-+ Neteisingas uþklausimas
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Dalis HTTP uþklausimo yra klaidinga. Galimos problemos:
-+ <UL>
-+ <LI>Trûksta arba neþinomas uþklausimo metodas
-+ <LI>Trûksta adresas
-+ <LI>Trûksta HTTP identifikatoriaus (HTTP/1.0)
-+ <LI>Uþklausimas per didelis
-+ <LI>Trûksta Content-Length parametro POST arba PUT uþklausime
-+ <LI>Neleistinas simbolis serverio varde; underscore simboliai yra neleistini
-+ </UL>
-+ </P>
-Index: squid/errors/Lithuanian/ERR_INVALID_URL
-diff -c /dev/null squid/errors/Lithuanian/ERR_INVALID_URL:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_INVALID_URL Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,29 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>KLAIDA</H1>
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>
-+ <HR noshade size="1px">
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Klaidingas adresas
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Kaþkuri adreso dalis yra klaidinga. Galimos ðios problemos:
-+ <UL>
-+ <LI>Trûksta arba klaidingas protokolas (turetø bûti `http://' ar panaðus)
-+ <LI>Trûksta serverio vardo
-+ <LI>Neleistinas double-escape kodas adrese
-+ <LI>Neleistinas simbolis serverio varde; underscores simboliai yra neleistini
-+ </UL>
-+ </P>
-Index: squid/errors/Lithuanian/ERR_LIFETIME_EXP
-diff -c /dev/null squid/errors/Lithuanian/ERR_LIFETIME_EXP:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_LIFETIME_EXP Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,24 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Ryðio trukmës laiko pabaiga
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Squid nutraukë uþklausimà, kadangi jis virðijo maksimalià
-+ ryðio trukmës reikðmæ.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_NO_RELAY
-diff -c /dev/null squid/errors/Lithuanian/ERR_NO_RELAY:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_NO_RELAY Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,24 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Nëra Wais Relay
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ WAIS Relay serveris yra nenurodytas ðiame proxy serveryje! \r
-+ Ðauk ant (tik ne á) admino.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS
-diff -c /dev/null squid/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_ONLY_IF_CACHED_MISS Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,26 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Tinkamas dokumentas nerastas proxy serveryje ir <code>only-if-cached</code>
-+ komanda buvo nurodyta.
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Jûs davëte uþklausimà su <code>only-if-cached</code> proxy kontrolës \r
-+ komanda. Dokumentas nerastas serveryje, <em>arba</em> jis pareikalavo
-+ patvirtinimo uþdrausto <code>only-if-cached</code> komandos.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_READ_ERROR
-diff -c /dev/null squid/errors/Lithuanian/ERR_READ_ERROR:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_READ_ERROR Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,28 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Skaitymo klaida
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Sistema atsakë:
-+ <PRE><I> %E</I></PRE>
-+
-+ <P>
-+ Ávyko klaida skaitant duomenis tinkle. \r
-+ Praðau pakartoti savo uþklausimà.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_READ_TIMEOUT
-diff -c /dev/null squid/errors/Lithuanian/ERR_READ_TIMEOUT:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_READ_TIMEOUT Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,28 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Leistino skaitymo laiko pabaiga
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Sistema atsakë:
-+ <PRE><I> %E</I></PRE>
-+
-+ <P>
-+ Klaida ávyko laukiant duomenø atsiuntimo ið tinklo. Tinklas arba serveris \r
-+ gali bûti atjungtas arba perkrautas. Praðau pakartoti jûsø uþklausimà.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_SOCKET_FAILURE
-diff -c /dev/null squid/errors/Lithuanian/ERR_SOCKET_FAILURE:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_SOCKET_FAILURE Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,28 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Socket klaida
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Sistema atsakë:
-+ <PRE><I> %E</I></PRE>
-+
-+ <P>
-+ Squid negalëjo sukurti TCP socket, greièiausiai dël per didelio apkrovimo.
-+ Praðau pakartoti savo uþklausimà.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_UNSUP_REQ
-diff -c /dev/null squid/errors/Lithuanian/ERR_UNSUP_REQ:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_UNSUP_REQ Tue Aug 13 06:33:41 2002
-***************
-*** 0 ****
---- 1,25 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Nepalaikomas uþklausos metodas ar protokolas
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Squid palaiko ne visus uþklausos metodus daliai protokolø.
-+ Pavyzdþiui, jûs negalite vykdyti POST Gopher tipo uþklausime.
-+ </P>
-+
-Index: squid/errors/Lithuanian/ERR_URN_RESOLVE
-diff -c /dev/null squid/errors/Lithuanian/ERR_URN_RESOLVE:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_URN_RESOLVE Tue Aug 13 06:33:42 2002
-***************
-*** 0 ****
---- 1,23 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>
-+ <TITLE>KLAIDA: Nurodytas URN negali bûti atsiøstas</TITLE>
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>
-+ <H1>KLAIDA</H1>
-+ <H2>puslapis nurodytam URN negali bûti atsiøstas</H2>
-+ <HR noshade size="1px">
-+ <P>
-+ Bandant atsiøsti URN:
-+ <A HREF="%U">%U</A>
-+ <P>
-+ Gautas klaidos praneðimas:
-+ <UL>
-+ <LI>
-+ <STRONG>
-+ Negaliu aptikti URN
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Mielieji, siûlau daug nesitikëti ið URNu %T :)
-+ </P>
-Index: squid/errors/Lithuanian/ERR_WRITE_ERROR
-diff -c /dev/null squid/errors/Lithuanian/ERR_WRITE_ERROR:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_WRITE_ERROR Tue Aug 13 06:33:42 2002
-***************
-*** 0 ****
---- 1,28 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Raðymo klaida
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Sistema atsakë:
-+ <PRE><I> %E</I></PRE>
-+
-+ <P>
-+ Ávyko klaida bandant raðyti tinkle. \r
-+ Praðau pakartoti savo uþklausimà.
-+ </P>
-Index: squid/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT
-diff -c /dev/null squid/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT:1.2.2.1
-*** /dev/null Sun May 25 07:57:32 2003
---- squid/errors/Lithuanian/ERR_ZERO_SIZE_OBJECT Tue Aug 13 06:33:42 2002
-***************
-*** 0 ****
---- 1,23 ----
-+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-+ <HTML><HEAD>\r
-+ <TITLE>KLAIDA: Puslapis nurodytu adresu negali bûti atsiøstas</TITLE>\r
-+ <STYLE type="text/css"><!--BODY{background-color:#ffffff; font-family:verdana,sans-serif}--></STYLE>
-+ </HEAD><BODY>\r
-+ <H1>KLAIDA</H1>\r
-+ <H2>Puslapis nurodytu adresu negali bûti atsiøstas</H2>\r
-+ <HR noshade size="1px">\r
-+ <P>\r
-+ Bandant atsiøsti puslapá:\r
-+ <A HREF="%U">%U</A>\r
-+ <P>\r
-+ Gautas klaidos praneðimas:\r
-+ <UL>\r
-+ <LI>
-+ <STRONG>
-+ Atsakymas nulinis
-+ </STRONG>
-+ </UL>
-+
-+ <P>
-+ Squid negavo jokiø duomenø ðiam uþklausimui.
-+ </P>
+++ /dev/null
-Index: squid/src/ftp.c
-diff -c squid/src/ftp.c:1.316.2.9 squid/src/ftp.c:1.316.2.10
-*** squid/src/ftp.c:1.316.2.9 Sun May 11 11:30:13 2003
---- squid/src/ftp.c Wed Jul 16 07:42:51 2003
-***************
-*** 266,271 ****
---- 266,277 ----
- ftpStateFree(int fdnotused, void *data)
- {
- FtpStateData *ftpState = data;
-+ ftpState->ctrl.fd = -1;
-+ if (ftpState->data.fd > -1) {
-+ int fd = ftpState->data.fd;
-+ ftpState->data.fd = -1;
-+ comm_close(fd);
-+ }
- cbdataFree(ftpState);
- }
-
-***************
-*** 312,321 ****
- stringClean(&ftpState->base_href);
- safe_free(ftpState->filepath);
- safe_free(ftpState->data.host);
-- if (ftpState->data.fd > -1) {
-- comm_close(ftpState->data.fd);
-- ftpState->data.fd = -1;
-- }
- }
-
- static void
---- 318,323 ----
-***************
-*** 1734,1740 ****
- ftpState->state = SENT_PASV;
- /*
- * ugly hack for ftp servers like ftp.netscape.com that sometimes
-! * dont acknowledge PORT commands.
- */
- commSetTimeout(ftpState->data.fd, 15, ftpTimeout, ftpState);
- }
---- 1736,1742 ----
- ftpState->state = SENT_PASV;
- /*
- * ugly hack for ftp servers like ftp.netscape.com that sometimes
-! * dont acknowledge PASV commands.
- */
- commSetTimeout(ftpState->data.fd, 15, ftpTimeout, ftpState);
- }
+++ /dev/null
-Index: squid/src/fs/aufs/store_io_aufs.c
-diff -c squid/src/fs/aufs/store_io_aufs.c:1.15.2.9 squid/src/fs/aufs/store_io_aufs.c:1.15.2.10
-*** squid/src/fs/aufs/store_io_aufs.c:1.15.2.9 Thu Nov 14 23:33:25 2002
---- squid/src/fs/aufs/store_io_aufs.c Wed Jun 18 17:13:40 2003
-***************
-*** 419,427 ****
- debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
- cbdataUnlock(their_data);
- aiostate->fd = -1;
-- cbdataFree(sio);
- if (aiostate->flags.opening)
- Opening_FD--;
- if (fd < 0)
- return;
- debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
---- 419,427 ----
- debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
- cbdataUnlock(their_data);
- aiostate->fd = -1;
- if (aiostate->flags.opening)
- Opening_FD--;
-+ cbdataFree(sio);
- if (fd < 0)
- return;
- debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
+++ /dev/null
-Index: squid/src/client_side.c
-diff -c squid/src/client_side.c:1.561.2.39 squid/src/client_side.c:1.561.2.40
-*** squid/src/client_side.c:1.561.2.39 Tue Jul 15 14:05:27 2003
---- squid/src/client_side.c Wed Aug 6 08:09:19 2003
-***************
-*** 1461,1467 ****
- memFree(buf, MEM_CLIENT_SOCK_BUF);
- debug(33, 3) ("clientCacheHit: request aborted\n");
- return;
-! } else if (size < 0) {
- /* swap in failure */
- memFree(buf, MEM_CLIENT_SOCK_BUF);
- debug(33, 3) ("clientCacheHit: swapin failure for %s\n", http->uri);
---- 1461,1467 ----
- memFree(buf, MEM_CLIENT_SOCK_BUF);
- debug(33, 3) ("clientCacheHit: request aborted\n");
- return;
-! } else if (size <= 0) {
- /* swap in failure */
- memFree(buf, MEM_CLIENT_SOCK_BUF);
- debug(33, 3) ("clientCacheHit: swapin failure for %s\n", http->uri);
+++ /dev/null
-Index: squid/src/fs/aufs/store_dir_aufs.c
-diff -c squid/src/fs/aufs/store_dir_aufs.c:1.40.2.7 squid/src/fs/aufs/store_dir_aufs.c:1.40.2.8
-*** squid/src/fs/aufs/store_dir_aufs.c:1.40.2.7 Wed Jan 8 20:38:38 2003
---- squid/src/fs/aufs/store_dir_aufs.c Wed Aug 6 08:16:26 2003
-***************
-*** 64,70 ****
- struct _store_rebuild_data counts;
- };
-
-! static int n_asyncufs_dirs = 0;
- static int *asyncufs_dir_index = NULL;
- MemPool *squidaio_state_pool = NULL;
- MemPool *aufs_qread_pool = NULL;
---- 64,70 ----
- struct _store_rebuild_data counts;
- };
-
-! int n_asyncufs_dirs = 0;
- static int *asyncufs_dir_index = NULL;
- MemPool *squidaio_state_pool = NULL;
- MemPool *aufs_qread_pool = NULL;
-Index: squid/src/fs/aufs/store_asyncufs.h
-diff -c squid/src/fs/aufs/store_asyncufs.h:1.9.2.1 squid/src/fs/aufs/store_asyncufs.h:1.9.2.2
-*** squid/src/fs/aufs/store_asyncufs.h:1.9.2.1 Sat Nov 9 03:42:36 2002
---- squid/src/fs/aufs/store_asyncufs.h Wed Aug 6 08:16:26 2003
-***************
-*** 7,22 ****
- #ifndef __STORE_ASYNCUFS_H__
- #define __STORE_ASYNCUFS_H__
-
-! #ifdef AUFS_IO_THREADS
-! #define NUMTHREADS AUFS_IO_THREADS
-! #else
-! #define NUMTHREADS (Config.cacheSwap.n_configured*16)
-! #endif
-
- /* Queue limit where swapouts are deferred (load calculation) */
-! #define MAGIC1 (NUMTHREADS*Config.cacheSwap.n_configured*5)
- /* Queue limit where swapins are deferred (open/create fails) */
-! #define MAGIC2 (NUMTHREADS*Config.cacheSwap.n_configured*20)
-
- /* Which operations to run async */
- #define ASYNC_OPEN 1
---- 7,27 ----
- #ifndef __STORE_ASYNCUFS_H__
- #define __STORE_ASYNCUFS_H__
-
-! extern int n_asyncufs_dirs;
-! extern int squidaio_nthreads;
-! extern int squidaio_magic1;
-! extern int squidaio_magic2;
-!
-! /* Base number of threads if not specified to configure.
-! * Weighted by number of directories (see aiops.c) */
-! #define THREAD_FACTOR 16
-
- /* Queue limit where swapouts are deferred (load calculation) */
-! #define MAGIC1_FACTOR 10
-! #define MAGIC1 squidaio_magic1
- /* Queue limit where swapins are deferred (open/create fails) */
-! #define MAGIC2_FACTOR 20
-! #define MAGIC2 squidaio_magic2
-
- /* Which operations to run async */
- #define ASYNC_OPEN 1
-Index: squid/src/fs/aufs/aiops.c
-diff -c squid/src/fs/aufs/aiops.c:1.12.2.7 squid/src/fs/aufs/aiops.c:1.12.2.8
-*** squid/src/fs/aufs/aiops.c:1.12.2.7 Wed Jan 8 22:04:23 2003
---- squid/src/fs/aufs/aiops.c Wed Aug 6 08:16:26 2003
-***************
-*** 53,58 ****
---- 53,66 ----
-
- #define RIDICULOUS_LENGTH 4096
-
-+ #ifdef AUFS_IO_THREADS
-+ int squidaio_nthreads = AUFS_IO_THREADS;
-+ #else
-+ int squidaio_nthreads = 0;
-+ #endif
-+ int squidaio_magic1 = 1; /* dummy initializer value */
-+ int squidaio_magic2 = 1; /* real value set in aiops.c */
-+
- enum _squidaio_thread_status {
- _THREAD_STARTING = 0,
- _THREAD_WAITING,
-***************
-*** 133,139 ****
- static squidaio_thread_t *threads = NULL;
- static int squidaio_initialised = 0;
-
--
- #define AIO_LARGE_BUFS 16384
- #define AIO_MEDIUM_BUFS AIO_LARGE_BUFS >> 1
- #define AIO_SMALL_BUFS AIO_LARGE_BUFS >> 2
---- 141,146 ----
-***************
-*** 309,315 ****
-
- /* Create threads and get them to sit in their wait loop */
- squidaio_thread_pool = memPoolCreate("aio_thread", sizeof(squidaio_thread_t));
-! for (i = 0; i < NUMTHREADS; i++) {
- threadp = memPoolAlloc(squidaio_thread_pool);
- threadp->status = _THREAD_STARTING;
- threadp->current_req = NULL;
---- 316,333 ----
-
- /* Create threads and get them to sit in their wait loop */
- squidaio_thread_pool = memPoolCreate("aio_thread", sizeof(squidaio_thread_t));
-! if (squidaio_nthreads == 0) {
-! int j = 16;
-! for (i = 0; i < n_asyncufs_dirs; i++) {
-! squidaio_nthreads += j;
-! j = j * 2 / 3;
-! if (j < 4)
-! j = 4;
-! }
-! }
-! squidaio_magic1 = squidaio_nthreads * MAGIC1_FACTOR;
-! squidaio_magic2 = squidaio_nthreads * MAGIC2_FACTOR;
-! for (i = 0; i < squidaio_nthreads; i++) {
- threadp = memPoolAlloc(squidaio_thread_pool);
- threadp->status = _THREAD_STARTING;
- threadp->current_req = NULL;
+++ /dev/null
-Index: squid/src/access_log.c
-diff -c squid/src/access_log.c:1.72.2.3 squid/src/access_log.c:1.72.2.4
-*** squid/src/access_log.c:1.72.2.3 Mon Jun 9 15:54:04 2003
---- squid/src/access_log.c Mon Jul 28 02:59:28 2003
-***************
-*** 229,234 ****
---- 229,236 ----
- {
- if (NULL == name)
- return NULL;
-+ if (name[0] == '\0')
-+ return NULL;
- return username_quote(name);
- }
-
+++ /dev/null
-Index: squid/src/snmp_agent.c
-diff -c squid/src/snmp_agent.c:1.83.2.1 squid/src/snmp_agent.c:1.83.2.2
-*** squid/src/snmp_agent.c:1.83.2.1 Fri May 2 03:48:43 2003
---- squid/src/snmp_agent.c Tue Jun 24 15:08:42 2003
-***************
-*** 195,206 ****
- case MESH_PTBL_SENT:
- Answer = snmp_var_new_integer(Var->name, Var->name_length,
- p->stats.pings_sent,
-! ASN_INTEGER);
- break;
- case MESH_PTBL_PACKED:
- Answer = snmp_var_new_integer(Var->name, Var->name_length,
- p->stats.pings_acked,
-! ASN_INTEGER);
- break;
- case MESH_PTBL_FETCHES:
- Answer = snmp_var_new_integer(Var->name, Var->name_length,
---- 195,206 ----
- case MESH_PTBL_SENT:
- Answer = snmp_var_new_integer(Var->name, Var->name_length,
- p->stats.pings_sent,
-! SMI_COUNTER32);
- break;
- case MESH_PTBL_PACKED:
- Answer = snmp_var_new_integer(Var->name, Var->name_length,
- p->stats.pings_acked,
-! SMI_COUNTER32);
- break;
- case MESH_PTBL_FETCHES:
- Answer = snmp_var_new_integer(Var->name, Var->name_length,
+++ /dev/null
-Index: squid/src/cf.data.pre
-diff -c squid/src/cf.data.pre:1.245.2.43 squid/src/cf.data.pre:1.245.2.44
-*** squid/src/cf.data.pre:1.245.2.43 Wed May 21 08:34:38 2003
---- squid/src/cf.data.pre Wed May 28 20:59:46 2003
-***************
-*** 742,749 ****
-
- cache_dir Type Directory-Name Fs-specific-data [options]
-
-- cache_dir diskd Maxobjsize Directory-Name MB L1 L2 Q1 Q2
--
- You can specify multiple cache_dir lines to spread the
- cache among different disk partitions.
-
---- 742,747 ----
+++ /dev/null
-Index: squid/src/carp.c
-diff -c squid/src/carp.c:1.15 squid/src/carp.c:1.15.2.1
-*** squid/src/carp.c:1.15 Thu Jan 11 17:37:15 2001
---- squid/src/carp.c Thu Jun 19 15:06:19 2003
-***************
-*** 51,58 ****
---- 51,70 ----
- double X_last;
- int k;
- peer *p;
-+ P_last = 0;
- for (p = Config.peers; p; p = p->next) {
-+ if (P_last > p->carp.load_factor) {
-+ /*
-+ * Section 3.3 of draft-vinod-carp-v1-03.txt says:
-+ *
-+ * The Load Factor Multiplier must be calculated from the smallest
-+ * P_k to the largest P_k. The sum of all P_k's must be 1.
-+ */
-+ debug(39, 0) ("WARNING: CARP load factor values must not decrease\n");
-+ debug(39, 0) ("WARNING: rearrange cache_peer lines so they increase\n");
-+ }
- a += p->carp.load_factor;
-+ P_last = p->carp.load_factor;
- K++;
- }
- if (a == 0.0) {
+++ /dev/null
-Index: squid/src/fs/coss/async_io.c
-diff -c squid/src/fs/coss/async_io.c:1.7.2.3 squid/src/fs/coss/async_io.c:1.7.2.4
-*** squid/src/fs/coss/async_io.c:1.7.2.3 Wed Jul 23 15:12:56 2003
---- squid/src/fs/coss/async_io.c Tue Jul 29 15:44:47 2003
-***************
-*** 62,75 ****
-
- assert(q->aq_state == AQ_STATE_SETUP);
-
-- #if 0
-- file_read(fd, buf, req_len, offset, callback, data);
-- #endif
- /* Find a free slot */
- slot = a_file_findslot(q);
- if (slot < 0) {
- /* No free slot? Callback error, and return */
-! fatal("Aiee! out of aiocb slots!\n");
- }
- /* Mark slot as ours */
- qe = &q->aq_queue[slot];
---- 62,75 ----
-
- assert(q->aq_state == AQ_STATE_SETUP);
-
- /* Find a free slot */
- slot = a_file_findslot(q);
- if (slot < 0) {
- /* No free slot? Callback error, and return */
-! debug(79, 1) ("WARNING: out of aiocb slots!\n");
-! /* fall back to blocking method */
-! file_read(fd, buf, req_len, offset, callback, data);
-! return;
- }
- /* Mark slot as ours */
- qe = &q->aq_queue[slot];
-***************
-*** 94,100 ****
-
- /* Initiate aio */
- if (aio_read(&qe->aq_e_aiocb) < 0) {
-! fatalf("Aiee! aio_read() returned error: %s\n", xstrerror());
- }
- }
-
---- 94,102 ----
-
- /* Initiate aio */
- if (aio_read(&qe->aq_e_aiocb) < 0) {
-! debug(79, 1) ("WARNING: aio_read() returned error: %s\n", xstrerror());
-! /* fall back to blocking method */
-! file_read(fd, buf, req_len, offset, callback, data);
- }
- }
-
-***************
-*** 108,121 ****
-
- assert(q->aq_state == AQ_STATE_SETUP);
-
-- #if 0
-- file_write(fd, offset, buf, len, callback, data, freefunc);
-- #endif
- /* Find a free slot */
- slot = a_file_findslot(q);
- if (slot < 0) {
- /* No free slot? Callback error, and return */
-! fatal("Aiee! out of aiocb slots!\n");
- }
- /* Mark slot as ours */
- qe = &q->aq_queue[slot];
---- 110,123 ----
-
- assert(q->aq_state == AQ_STATE_SETUP);
-
- /* Find a free slot */
- slot = a_file_findslot(q);
- if (slot < 0) {
- /* No free slot? Callback error, and return */
-! debug(79, 1) ("WARNING: out of aiocb slots!\n");
-! /* fall back to blocking method */
-! file_write(fd, offset, buf, len, callback, data, freefunc);
-! return;
- }
- /* Mark slot as ours */
- qe = &q->aq_queue[slot];
-***************
-*** 140,146 ****
-
- /* Initiate aio */
- if (aio_write(&qe->aq_e_aiocb) < 0) {
-! fatalf("Aiee! aio_write() returned error: %s\n", xstrerror());
- }
- }
-
---- 142,150 ----
-
- /* Initiate aio */
- if (aio_write(&qe->aq_e_aiocb) < 0) {
-! debug(79, 1) ("WARNING: aio_write() returned error: %s\n", xstrerror());
-! /* fall back to blocking method */
-! file_write(fd, offset, buf, len, callback, data, freefunc);
- }
- }
-
-Index: squid/src/fs/coss/store_coss.h
-diff -c squid/src/fs/coss/store_coss.h:1.6.2.1 squid/src/fs/coss/store_coss.h:1.6.2.2
-*** squid/src/fs/coss/store_coss.h:1.6.2.1 Wed Jul 23 15:00:33 2003
---- squid/src/fs/coss/store_coss.h Tue Jul 29 16:19:43 2003
-***************
-*** 12,17 ****
---- 12,36 ----
- #define COSS_ALLOC_ALLOCATE 1
- #define COSS_ALLOC_REALLOC 2
-
-+ struct _coss_stats {
-+ int stripes;
-+ struct {
-+ int alloc;
-+ int realloc;
-+ int collisions;
-+ } alloc;
-+ int disk_overflows;
-+ int stripe_overflows;
-+ int open_mem_hits;
-+ int open_mem_misses;
-+ struct {
-+ int ops;
-+ int success;
-+ int fail;
-+ } open, create, close, unlink, read, write, stripe_write;
-+ };
-+
-+
- struct _cossmembuf {
- dlink_node node;
- size_t diskstart; /* in blocks */
-***************
-*** 89,93 ****
---- 108,114 ----
- extern void storeCossAdd(SwapDir *, StoreEntry *);
- extern void storeCossRemove(SwapDir *, StoreEntry *);
- extern void storeCossStartMembuf(SwapDir * SD);
-+
-+ extern struct _coss_stats coss_stats;
-
- #endif
-Index: squid/src/fs/coss/store_dir_coss.c
-diff -c squid/src/fs/coss/store_dir_coss.c:1.30.2.7 squid/src/fs/coss/store_dir_coss.c:1.30.2.8
-*** squid/src/fs/coss/store_dir_coss.c:1.30.2.7 Fri Jul 25 10:56:02 2003
---- squid/src/fs/coss/store_dir_coss.c Tue Jul 29 16:19:43 2003
-***************
-*** 91,96 ****
---- 91,97 ----
- static STCALLBACK storeCossDirCallback;
- static void storeCossDirParseBlkSize(SwapDir *, const char *, const char *, int);
- static void storeCossDirDumpBlkSize(StoreEntry *, const char *, SwapDir *);
-+ static OBJH storeCossStats;
-
- /* The "only" externally visible function */
- STSETUP storeFsSetup_coss;
-***************
-*** 101,106 ****
---- 102,109 ----
- {NULL, NULL}
- };
-
-+ struct _coss_stats coss_stats;
-+
- static char *
- storeCossDirSwapLogFile(SwapDir * sd, const char *ext)
- {
-***************
-*** 956,961 ****
---- 959,995 ----
- coss_initialised = 0;
- }
-
-+ static void
-+ storeCossStats(StoreEntry * sentry)
-+ {
-+ const char *tbl_fmt = "%10s %10d %10d %10d\n";
-+ storeAppendPrintf(sentry, "\n OPS SUCCESS FAIL\n");
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "open", coss_stats.open.ops, coss_stats.open.success, coss_stats.open.fail);
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "create", coss_stats.create.ops, coss_stats.create.success, coss_stats.create.fail);
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "close", coss_stats.close.ops, coss_stats.close.success, coss_stats.close.fail);
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "unlink", coss_stats.unlink.ops, coss_stats.unlink.success, coss_stats.unlink.fail);
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "read", coss_stats.read.ops, coss_stats.read.success, coss_stats.read.fail);
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "write", coss_stats.write.ops, coss_stats.write.success, coss_stats.write.fail);
-+ storeAppendPrintf(sentry, tbl_fmt,
-+ "s_write", coss_stats.stripe_write.ops, coss_stats.stripe_write.success, coss_stats.stripe_write.fail);
-+
-+ storeAppendPrintf(sentry, "\n");
-+ storeAppendPrintf(sentry, "stripes: %d\n", coss_stats.stripes);
-+ storeAppendPrintf(sentry, "alloc.alloc: %d\n", coss_stats.alloc.alloc);
-+ storeAppendPrintf(sentry, "alloc.realloc: %d\n", coss_stats.alloc.realloc);
-+ storeAppendPrintf(sentry, "alloc.collisions: %d\n", coss_stats.alloc.collisions);
-+ storeAppendPrintf(sentry, "disk_overflows: %d\n", coss_stats.disk_overflows);
-+ storeAppendPrintf(sentry, "stripe_overflows: %d\n", coss_stats.stripe_overflows);
-+ storeAppendPrintf(sentry, "open_mem_hits: %d\n", coss_stats.open_mem_hits);
-+ storeAppendPrintf(sentry, "open_mem_misses: %d\n", coss_stats.open_mem_misses);
-+ }
-+
- void
- storeFsSetup_coss(storefs_entry_t * storefs)
- {
-***************
-*** 966,970 ****
---- 1000,1005 ----
- storefs->donefunc = storeCossDirDone;
- coss_state_pool = memPoolCreate("COSS IO State data", sizeof(CossState));
- coss_index_pool = memPoolCreate("COSS index data", sizeof(CossIndexNode));
-+ cachemgrRegister("coss", "COSS Stats", storeCossStats, 0, 1);
- coss_initialised = 1;
- }
-Index: squid/src/fs/coss/store_io_coss.c
-diff -c squid/src/fs/coss/store_io_coss.c:1.13.2.6 squid/src/fs/coss/store_io_coss.c:1.13.2.8
-*** squid/src/fs/coss/store_io_coss.c:1.13.2.6 Wed Jul 23 15:12:56 2003
---- squid/src/fs/coss/store_io_coss.c Tue Jul 29 16:19:43 2003
-***************
-*** 78,87 ****
- sfileno checkf;
-
- /* Make sure we chcek collisions if reallocating */
-! if (which == COSS_ALLOC_REALLOC)
- checkf = e->swap_filen;
-! else
- checkf = -1;
-
- if (e->swap_file_sz > 0)
- allocsize = e->swap_file_sz;
---- 78,90 ----
- sfileno checkf;
-
- /* Make sure we chcek collisions if reallocating */
-! if (which == COSS_ALLOC_REALLOC) {
- checkf = e->swap_filen;
-! coss_stats.alloc.realloc++;
-! } else {
- checkf = -1;
-+ coss_stats.alloc.alloc++;
-+ }
-
- if (e->swap_file_sz > 0)
- allocsize = e->swap_file_sz;
-***************
-*** 92,104 ****
- assert(which != COSS_ALLOC_NOTIFY);
-
- /* Check if we have overflowed the disk .. */
-! if ((cs->current_offset + allocsize) > (SD->max_size << 10)) {
- /*
- * tried to allocate past the end of the disk, so wrap
- * back to the beginning
- */
- cs->current_membuf->flags.full = 1;
-! cs->current_membuf->diskend = cs->current_offset - 1;
- storeCossMaybeWriteMemBuf(SD, cs->current_membuf);
- cs->current_offset = 0; /* wrap back to beginning */
- debug(79, 2) ("storeCossAllocate: wrap to 0\n");
---- 95,108 ----
- assert(which != COSS_ALLOC_NOTIFY);
-
- /* Check if we have overflowed the disk .. */
-! if ((cs->current_offset + allocsize) > ((off_t) SD->max_size << 10)) {
- /*
- * tried to allocate past the end of the disk, so wrap
- * back to the beginning
- */
-+ coss_stats.disk_overflows++;
- cs->current_membuf->flags.full = 1;
-! cs->current_membuf->diskend = cs->current_offset;
- storeCossMaybeWriteMemBuf(SD, cs->current_membuf);
- cs->current_offset = 0; /* wrap back to beginning */
- debug(79, 2) ("storeCossAllocate: wrap to 0\n");
-***************
-*** 107,118 ****
- cs->current_membuf = newmb;
-
- /* Check if we have overflowed the MemBuf */
-! } else if ((cs->current_offset + allocsize) > cs->current_membuf->diskend) {
- /*
- * Skip the blank space at the end of the stripe. start over.
- */
- cs->current_membuf->flags.full = 1;
-! cs->current_offset = cs->current_membuf->diskend + 1;
- storeCossMaybeWriteMemBuf(SD, cs->current_membuf);
- debug(79, 2) ("storeCossAllocate: New offset - %ld\n",
- (long int) cs->current_offset);
---- 111,123 ----
- cs->current_membuf = newmb;
-
- /* Check if we have overflowed the MemBuf */
-! } else if ((cs->current_offset + allocsize) >= cs->current_membuf->diskend) {
- /*
- * Skip the blank space at the end of the stripe. start over.
- */
-+ coss_stats.stripe_overflows++;
- cs->current_membuf->flags.full = 1;
-! cs->current_offset = cs->current_membuf->diskend;
- storeCossMaybeWriteMemBuf(SD, cs->current_membuf);
- debug(79, 2) ("storeCossAllocate: New offset - %ld\n",
- (long int) cs->current_offset);
-***************
-*** 127,132 ****
---- 132,138 ----
- cs->current_offset = ((cs->current_offset + cs->blksz_mask) >> cs->blksz_bits) << cs->blksz_bits;
- return storeCossDiskOffsetToFileno(retofs, cs);
- } else {
-+ coss_stats.alloc.collisions++;
- debug(79, 3) ("storeCossAllocate: Collision\n");
- return -1;
- }
-***************
-*** 136,141 ****
---- 142,149 ----
- storeCossUnlink(SwapDir * SD, StoreEntry * e)
- {
- debug(79, 3) ("storeCossUnlink: offset %d\n", e->swap_filen);
-+ coss_stats.unlink.ops++;
-+ coss_stats.unlink.success++;
- storeCossRemove(SD, e);
- }
-
-***************
-*** 146,152 ****
- CossState *cstate;
- storeIOState *sio;
-
-! CBDATA_INIT_TYPE_FREECB(storeIOState, storeCossIOFreeEntry);
- sio = cbdataAlloc(storeIOState);
- cstate = memPoolAlloc(coss_state_pool);
- sio->fsstate = cstate;
---- 154,160 ----
- CossState *cstate;
- storeIOState *sio;
-
-! coss_stats.create.ops++;
- sio = cbdataAlloc(storeIOState);
- cstate = memPoolAlloc(coss_state_pool);
- sio->fsstate = cstate;
-***************
-*** 170,175 ****
---- 178,184 ----
- (long int) storeCossFilenoToDiskOffset(sio->swap_filen, SD->fsdata),
- (long int) sio->st_size,
- (long int) (sio->swap_filen + sio->st_size));
-+ assert(-1 != sio->swap_filen);
-
- sio->callback = callback;
- sio->file_callback = file_callback;
-***************
-*** 186,191 ****
---- 195,201 ----
- storeCossAdd(SD, e);
-
- storeCossMemBufLock(SD, sio);
-+ coss_stats.create.success++;
- return sio;
- }
-
-***************
-*** 200,207 ****
- CossInfo *cs = (CossInfo *) SD->fsdata;
-
- debug(79, 3) ("storeCossOpen: offset %d\n", f);
-
-- CBDATA_INIT_TYPE_FREECB(storeIOState, storeCossIOFreeEntry);
- sio = cbdataAlloc(storeIOState);
- cstate = memPoolAlloc(coss_state_pool);
-
---- 210,217 ----
- CossInfo *cs = (CossInfo *) SD->fsdata;
-
- debug(79, 3) ("storeCossOpen: offset %d\n", f);
-+ coss_stats.open.ops++;
-
- sio = cbdataAlloc(storeIOState);
- cstate = memPoolAlloc(coss_state_pool);
-
-***************
-*** 226,237 ****
---- 236,249 ----
- if (p) {
- cstate->readbuffer = xmalloc(sio->st_size);
- xmemcpy(cstate->readbuffer, p, sio->st_size);
-+ coss_stats.open_mem_hits++;
- } else {
- /* Do the allocation */
- /* this is the first time we've been called on a new sio
- * read the whole object into memory, then return the
- * requested amount
- */
-+ coss_stats.open_mem_misses++;
- /*
- * This bit of code actually does the LRU disk thing - we realloc
- * a place for the object here, and the file_read() reads the object
-***************
-*** 241,246 ****
---- 253,259 ----
- sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_REALLOC);
- if (sio->swap_filen == -1) {
- /* We have to clean up neatly .. */
-+ coss_stats.open.fail++;
- cbdataFree(sio);
- cs->numcollisions++;
- debug(79, 2) ("storeCossOpen: Reallocation of %d/%d failed\n", e->swap_dirn, e->swap_filen);
-***************
-*** 268,273 ****
---- 281,287 ----
- * return that pointer back to the caller
- */
- }
-+ coss_stats.open.success++;
- return sio;
- }
-
-***************
-*** 275,280 ****
---- 289,296 ----
- storeCossClose(SwapDir * SD, storeIOState * sio)
- {
- debug(79, 3) ("storeCossClose: offset %d\n", sio->swap_filen);
-+ coss_stats.close.ops++;
-+ coss_stats.close.success++;
- storeCossMemBufUnlock(SD, sio);
- storeCossIOCallback(sio, 0);
- }
-***************
-*** 286,291 ****
---- 302,308 ----
- CossState *cstate = (CossState *) sio->fsstate;
- CossInfo *cs = (CossInfo *) SD->fsdata;
-
-+ coss_stats.read.ops++;
- assert(sio->read.callback == NULL);
- assert(sio->read.callback_data == NULL);
- sio->read.callback = callback;
-***************
-*** 300,306 ****
- cstate->requestoffset = offset;
- if (cstate->readbuffer == NULL) {
- p = storeCossMemPointerFromDiskOffset(SD, storeCossFilenoToDiskOffset(sio->swap_filen, cs), NULL);
-- /* Remember we need to translate the block offset to a disk offset! */
- a_file_read(&cs->aq, cs->fd,
- p,
- sio->st_size,
---- 317,322 ----
-***************
-*** 332,337 ****
---- 348,354 ----
- * the squid code is broken
- */
- assert(sio->e->mem_obj->object_sz != -1);
-+ coss_stats.write.ops++;
-
- debug(79, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size);
- diskoffset = storeCossFilenoToDiskOffset(sio->swap_filen, SD->fsdata) + sio->offset;
-***************
-*** 341,346 ****
---- 358,364 ----
- sio->offset += size;
- if (free_func)
- (free_func) (buf);
-+ coss_stats.write.success++;
- }
-
-
-***************
-*** 361,369 ****
- sio->swap_filen, fd, len);
- cstate->flags.reading = 0;
- if (errflag) {
-! debug(79, 3) ("storeCossReadDone: got failure (%d)\n", errflag);
- rlen = -1;
- } else {
- if (cstate->readbuffer == NULL) {
- cstate->readbuffer = xmalloc(sio->st_size);
- p = storeCossMemPointerFromDiskOffset(SD,
---- 379,394 ----
- sio->swap_filen, fd, len);
- cstate->flags.reading = 0;
- if (errflag) {
-! coss_stats.read.fail++;
-! if (errflag > 0) {
-! errno = errflag;
-! debug(79, 1) ("storeCossReadDone: error: %s\n", xstrerror());
-! } else {
-! debug(79, 1) ("storeCossReadDone: got failure (%d)\n", errflag);
-! }
- rlen = -1;
- } else {
-+ coss_stats.read.success++;
- if (cstate->readbuffer == NULL) {
- cstate->readbuffer = xmalloc(sio->st_size);
- p = storeCossMemPointerFromDiskOffset(SD,
-***************
-*** 407,413 ****
-
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! if ((offset >= t->diskstart) && (offset <= t->diskend)) {
- if (mb)
- *mb = t;
- return &t->buffer[offset - t->diskstart];
---- 432,438 ----
-
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! if ((offset >= t->diskstart) && (offset < t->diskend)) {
- if (mb)
- *mb = t;
- return &t->buffer[offset - t->diskstart];
-***************
-*** 428,434 ****
- off_t o = storeCossFilenoToDiskOffset(s, cs);
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! if ((o >= t->diskstart) && (o <= t->diskend))
- break;
- }
- assert(t);
---- 453,459 ----
- off_t o = storeCossFilenoToDiskOffset(s, cs);
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! if ((o >= t->diskstart) && (o < t->diskend))
- break;
- }
- assert(t);
-***************
-*** 503,512 ****
- storeCossWriteMemBuf(SwapDir * SD, CossMemBuf * t)
- {
- CossInfo *cs = (CossInfo *) SD->fsdata;
- debug(79, 3) ("storeCossWriteMemBuf: offset %ld, len %ld\n",
- (long int) t->diskstart, (long int) (t->diskend - t->diskstart));
- t->flags.writing = 1;
-- /* Remember that diskstart/diskend are block offsets! */
- a_file_write(&cs->aq, cs->fd, t->diskstart, &t->buffer,
- t->diskend - t->diskstart, storeCossWriteMemBufDone, t, NULL);
- }
---- 528,537 ----
- storeCossWriteMemBuf(SwapDir * SD, CossMemBuf * t)
- {
- CossInfo *cs = (CossInfo *) SD->fsdata;
-+ coss_stats.stripe_write.ops++;
- debug(79, 3) ("storeCossWriteMemBuf: offset %ld, len %ld\n",
- (long int) t->diskstart, (long int) (t->diskend - t->diskstart));
- t->flags.writing = 1;
- a_file_write(&cs->aq, cs->fd, t->diskstart, &t->buffer,
- t->diskend - t->diskstart, storeCossWriteMemBufDone, t, NULL);
- }
-***************
-*** 519,529 ****
- CossInfo *cs = (CossInfo *) t->SD->fsdata;
-
- debug(79, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int) len);
-! if (errflag)
-! debug(79, 0) ("storeCossMemBufWriteDone: got failure (%d)\n", errflag);
-
- dlinkDelete(&t->node, &cs->membufs);
- cbdataFree(t);
- }
-
- static CossMemBuf *
---- 544,560 ----
- CossInfo *cs = (CossInfo *) t->SD->fsdata;
-
- debug(79, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int) len);
-! if (errflag) {
-! coss_stats.stripe_write.fail++;
-! debug(79, 1) ("storeCossWriteMemBufDone: got failure (%d)\n", errflag);
-! debug(79, 1) ("FD %d, size=%x\n", fd, t->diskend - t->diskstart);
-! } else {
-! coss_stats.stripe_write.success++;
-! }
-
- dlinkDelete(&t->node, &cs->membufs);
- cbdataFree(t);
-+ coss_stats.stripes--;
- }
-
- static CossMemBuf *
-***************
-*** 536,547 ****
- int numreleased = 0;
- CossInfo *cs = (CossInfo *) SD->fsdata;
-
-- CBDATA_INIT_TYPE_FREECB(CossMemBuf, NULL);
- newmb = cbdataAlloc(CossMemBuf);
- newmb->diskstart = start;
- debug(79, 3) ("storeCossCreateMemBuf: creating new membuf at %ld\n", (long int) newmb->diskstart);
- debug(79, 3) ("storeCossCreateMemBuf: at %p\n", newmb);
-! newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ - 1;
- newmb->flags.full = 0;
- newmb->flags.writing = 0;
- newmb->lockcount = 0;
---- 567,577 ----
- int numreleased = 0;
- CossInfo *cs = (CossInfo *) SD->fsdata;
-
- newmb = cbdataAlloc(CossMemBuf);
- newmb->diskstart = start;
- debug(79, 3) ("storeCossCreateMemBuf: creating new membuf at %ld\n", (long int) newmb->diskstart);
- debug(79, 3) ("storeCossCreateMemBuf: at %p\n", newmb);
-! newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ;
- newmb->flags.full = 0;
- newmb->flags.writing = 0;
- newmb->lockcount = 0;
-***************
-*** 566,573 ****
- o = storeCossFilenoToDiskOffset(e->swap_filen, cs);
- if (curfn == e->swap_filen)
- *collision = 1; /* Mark an object alloc collision */
-! if ((o >= newmb->diskstart) &&
-! (o <= newmb->diskend)) {
- storeRelease(e);
- numreleased++;
- } else
---- 596,602 ----
- o = storeCossFilenoToDiskOffset(e->swap_filen, cs);
- if (curfn == e->swap_filen)
- *collision = 1; /* Mark an object alloc collision */
-! if ((o >= newmb->diskstart) && (o < newmb->diskend)) {
- storeRelease(e);
- numreleased++;
- } else
-***************
-*** 575,580 ****
---- 604,610 ----
- }
- if (numreleased > 0)
- debug(79, 3) ("storeCossCreateMemBuf: this allocation released %d storeEntries\n", numreleased);
-+ coss_stats.stripes++;
- return newmb;
- }
-
-***************
-*** 585,591 ****
- storeCossStartMembuf(SwapDir * sd)
- {
- CossInfo *cs = (CossInfo *) sd->fsdata;
-! CossMemBuf *newmb = storeCossCreateMemBuf(sd, cs->current_offset, -1, NULL);
- assert(!cs->current_membuf);
- cs->current_membuf = newmb;
- }
---- 615,625 ----
- storeCossStartMembuf(SwapDir * sd)
- {
- CossInfo *cs = (CossInfo *) sd->fsdata;
-! CossMemBuf *newmb;
-! CBDATA_INIT_TYPE_FREECB(storeIOState, storeCossIOFreeEntry);
-! CBDATA_INIT_TYPE_FREECB(CossMemBuf, NULL);
-! CBDATA_INIT_TYPE_FREECB(storeIOState, storeCossIOFreeEntry);
-! newmb = storeCossCreateMemBuf(sd, cs->current_offset, -1, NULL);
- assert(!cs->current_membuf);
- cs->current_membuf = newmb;
- }
+++ /dev/null
-Index: squid/src/cf.data.pre
-diff -c squid/src/cf.data.pre:1.245.2.47 squid/src/cf.data.pre:1.245.2.48
-*** squid/src/cf.data.pre:1.245.2.47 Tue Jul 1 14:42:41 2003
---- squid/src/cf.data.pre Wed Jul 23 15:00:33 2003
-***************
-*** 803,808 ****
---- 803,818 ----
- starts blocking. If this many messages are in the queues,
- Squid blocks until it recevies some replies. Default is 72
-
-+ The coss store type:
-+
-+ block-size=n defines the "block size" for COSS cache_dir's.
-+ Squid uses file numbers as block numbers. Since file numbers
-+ are limited to 24 bits, the block size determines the maximum
-+ size of the COSS partition. The default is 512 bytes, which
-+ leads to a maximum cache_dir size of 512<<24, or 8 GB. Note
-+ that you should not change the coss block size after Squid
-+ has written some objects to the cache_dir.
-+
- Common options:
-
- read-only, this cache_dir is read only.
-***************
-*** 812,817 ****
---- 822,830 ----
- Note: To make optimal use of the max-size limits you should order
- the cache_dir lines with the smallest max-size value first and the
- ones with no max-size specification last.
-+
-+ Note that for coss, max-size must be less than COSS_MEMBUF_SZ
-+ (hard coded at 1 MB).
- DOC_END
-
-
-Index: squid/src/fs/coss/async_io.c
-diff -c squid/src/fs/coss/async_io.c:1.7.2.1 squid/src/fs/coss/async_io.c:1.7.2.3
-*** squid/src/fs/coss/async_io.c:1.7.2.1 Sat Jul 20 18:30:03 2002
---- squid/src/fs/coss/async_io.c Wed Jul 23 15:12:56 2003
-***************
-*** 94,100 ****
-
- /* Initiate aio */
- if (aio_read(&qe->aq_e_aiocb) < 0) {
-! fatalf("Aiee! aio_read() returned error (%d)!\n", errno);
- }
- }
-
---- 94,100 ----
-
- /* Initiate aio */
- if (aio_read(&qe->aq_e_aiocb) < 0) {
-! fatalf("Aiee! aio_read() returned error: %s\n", xstrerror());
- }
- }
-
-***************
-*** 140,146 ****
-
- /* Initiate aio */
- if (aio_write(&qe->aq_e_aiocb) < 0) {
-! fatalf("Aiee! aio_read() returned error (%d)!\n", errno);
- }
- }
-
---- 140,146 ----
-
- /* Initiate aio */
- if (aio_write(&qe->aq_e_aiocb) < 0) {
-! fatalf("Aiee! aio_write() returned error: %s\n", xstrerror());
- }
- }
-
-Index: squid/src/fs/coss/coss-notes.txt
-diff -c squid/src/fs/coss/coss-notes.txt:1.1 squid/src/fs/coss/coss-notes.txt:1.1.2.1
-*** squid/src/fs/coss/coss-notes.txt:1.1 Wed Sep 19 07:23:30 2001
---- squid/src/fs/coss/coss-notes.txt Wed Jul 23 15:00:33 2003
-***************
-*** 89,91 ****
---- 89,123 ----
- planned rewrite. This would also allow alternate replacement policies
- to be used. Oh, it'd cut down the storage requirements per
- StoreEntry by two pointers (8 bytes on the i386.)
-+
-+ Notes by DW July 23, 2003
-+ -------------------------
-+
-+ Fixed up swap_filen -> offset implementation. Now user can use a
-+ block-size setting to determine the maximum COSS cache_dir size.
-+
-+ Fixed bug when cached response is larger than COSS stripe size.
-+ Now require max-size to be less than COSS_MEMBUF_SZ.
-+
-+ Fixed a lockcount bug. Some aborted requests for cache hits failed
-+ to unlock the CossMemBuf because storeCossReadDone isn't called again.
-+ Solution is to add locked_membuf pointer to CossState structure and
-+ always unlock it if set. This is probably more reliable than
-+ unlocking based on diskstart/diskend offsets.
-+
-+ I'm worried that COSS is susceptible to a denial-of-service. If
-+ the user can create N cache misses for responses about as large as
-+ COSS_MEMBUF_SZ, then COSS probably allocates N membufs (stripes)
-+ at the same time. For large enough values of N, this should cause
-+ a malloc failure. Solution may be to refuse to allocate new stripes
-+ (thus returning failure for cache misses and hits) after so many
-+ have already been allocated.
-+
-+ Adrian's code has this comment:
-+
-+ /* Since we're not supporting NOTIFY anymore, lets fail */
-+ assert(which != COSS_ALLOC_NOTIFY);
-+
-+ However, COSS_ALLOC_NOTIFY was still present in the store_dir_coss.c
-+ rebuild routines. To avoid assertions during rebuild, I commented
-+ out the storeCossAllocate(SD, e, COSS_ALLOC_NOTIFY) call.
-Index: squid/src/fs/coss/store_coss.h
-diff -c squid/src/fs/coss/store_coss.h:1.6 squid/src/fs/coss/store_coss.h:1.6.2.1
-*** squid/src/fs/coss/store_coss.h:1.6 Sun Aug 12 04:20:41 2001
---- squid/src/fs/coss/store_coss.h Wed Jul 23 15:00:33 2003
-***************
-*** 5,18 ****
- #define COSS_MEMBUF_SZ 1048576
- #endif
-
-- #ifndef COSS_BLOCK_SZ
-- #define COSS_BLOCK_SZ 512
-- #endif
--
-- /* Macros to help block<->offset transiting */
-- #define COSS_OFS_TO_BLK(ofs) ((ofs) / COSS_BLOCK_SZ)
-- #define COSS_BLK_TO_OFS(ofs) ((ofs) * COSS_BLOCK_SZ)
--
- /* Note that swap_filen in sio/e are actually disk offsets too! */
-
- /* What we're doing in storeCossAllocate() */
---- 5,10 ----
-***************
-*** 46,51 ****
---- 38,45 ----
- int count;
- async_queue_t aq;
- dlink_node *walk_current;
-+ unsigned int blksz_bits;
-+ unsigned int blksz_mask; /* just 1<<blksz_bits - 1 */
- };
-
- struct _cossindex {
-***************
-*** 67,72 ****
---- 61,67 ----
- unsigned int reading:1;
- unsigned int writing:1;
- } flags;
-+ struct _cossmembuf *locked_membuf;
- };
-
- typedef struct _cossmembuf CossMemBuf;
-***************
-*** 91,97 ****
- extern STOBJUNLINK storeCossUnlink;
- extern STSYNC storeCossSync;
-
-- extern off_t storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which);
- extern void storeCossAdd(SwapDir *, StoreEntry *);
- extern void storeCossRemove(SwapDir *, StoreEntry *);
- extern void storeCossStartMembuf(SwapDir * SD);
---- 86,91 ----
-Index: squid/src/fs/coss/store_dir_coss.c
-diff -c squid/src/fs/coss/store_dir_coss.c:1.30.2.5 squid/src/fs/coss/store_dir_coss.c:1.30.2.7
-*** squid/src/fs/coss/store_dir_coss.c:1.30.2.5 Wed Jan 8 20:38:41 2003
---- squid/src/fs/coss/store_dir_coss.c Fri Jul 25 10:56:02 2003
-***************
-*** 89,98 ****
---- 89,106 ----
- static STFSRECONFIGURE storeCossDirReconfigure;
- static STDUMP storeCossDirDump;
- static STCALLBACK storeCossDirCallback;
-+ static void storeCossDirParseBlkSize(SwapDir *, const char *, const char *, int);
-+ static void storeCossDirDumpBlkSize(StoreEntry *, const char *, SwapDir *);
-
- /* The "only" externally visible function */
- STSETUP storeFsSetup_coss;
-
-+ static struct cache_dir_option options[] =
-+ {
-+ {"block-size", storeCossDirParseBlkSize, storeCossDirDumpBlkSize},
-+ {NULL, NULL}
-+ };
-+
- static char *
- storeCossDirSwapLogFile(SwapDir * sd, const char *ext)
- {
-***************
-*** 161,170 ****
- cs->fd = file_open(sd->path, O_RDWR | O_CREAT);
- if (cs->fd < 0) {
- debug(79, 1) ("%s: %s\n", sd->path, xstrerror());
-! fatal("storeCossDirInit: Failed to open a COSS directory.");
- }
- n_coss_dirs++;
-! (void) storeDirGetBlkSize(sd->path, &sd->fs.blksize);
- }
-
- void
---- 169,184 ----
- cs->fd = file_open(sd->path, O_RDWR | O_CREAT);
- if (cs->fd < 0) {
- debug(79, 1) ("%s: %s\n", sd->path, xstrerror());
-! fatal("storeCossDirInit: Failed to open a COSS file.");
- }
- n_coss_dirs++;
-! /*
-! * fs.blksize is normally determined by calling statvfs() etc,
-! * but we just set it here. It is used in accounting the
-! * total store size, and is reported in cachemgr 'storedir'
-! * page.
-! */
-! sd->fs.blksize = 1 << cs->blksz_bits;
- }
-
- void
-***************
-*** 335,341 ****
---- 349,358 ----
- EBIT_CLR(e->flags, ENTRY_VALIDATED);
- storeHashInsert(e, key); /* do it after we clear KEY_PRIVATE */
- storeCossAdd(SD, e);
-+ #if USE_COSS_ALLOC_NOTIFY
- e->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_NOTIFY);
-+ #endif
-+ assert(e->swap_filen >= 0);
- return e;
- }
-
-***************
-*** 742,747 ****
---- 759,765 ----
- unsigned int i;
- unsigned int size;
- CossInfo *cs;
-+ off_t max_offset;
-
- i = GetInteger();
- size = i << 10; /* Mbytes to Kbytes */
-***************
-*** 796,806 ****
- cs->current_membuf = NULL;
- cs->index.head = NULL;
- cs->index.tail = NULL;
-
-! parse_cachedir_options(sd, NULL, 0);
- /* Enforce maxobjsize being set to something */
- if (sd->max_objsize == -1)
- fatal("COSS requires max-size to be set to something other than -1!\n");
- }
-
-
---- 814,840 ----
- cs->current_membuf = NULL;
- cs->index.head = NULL;
- cs->index.tail = NULL;
-+ cs->blksz_bits = 9; /* default block size = 512 */
-+ cs->blksz_mask = (1 << cs->blksz_bits) - 1;
-
-! parse_cachedir_options(sd, options, 0);
- /* Enforce maxobjsize being set to something */
- if (sd->max_objsize == -1)
- fatal("COSS requires max-size to be set to something other than -1!\n");
-+ if (sd->max_objsize > COSS_MEMBUF_SZ)
-+ fatalf("COSS max-size option must be less than COSS_MEMBUF_SZ (%d)\n", COSS_MEMBUF_SZ);
-+ /*
-+ * check that we won't overflow sfileno later. 0xFFFFFF is the
-+ * largest possible sfileno, assuming sfileno is a 25-bit
-+ * signed integer, as defined in structs.h.
-+ */
-+ max_offset = (off_t) 0xFFFFFF << cs->blksz_bits;
-+ if (sd->max_size > (max_offset >> 10)) {
-+ debug(47, 0) ("COSS block-size = %d bytes\n", 1 << cs->blksz_bits);
-+ debug(47, 0) ("COSS largest file offset = %lu KB\n", (unsigned long) max_offset >> 10);
-+ debug(47, 0) ("COSS cache_dir size = %d KB\n", sd->max_size);
-+ fatal("COSS cache_dir size exceeds largest offset\n");
-+ }
- }
-
-
-***************
-*** 821,827 ****
- debug(3, 1) ("Cache COSS dir '%s' size changed to %d KB\n", path, size);
- sd->max_size = size;
- }
-! parse_cachedir_options(sd, NULL, 1);
- /* Enforce maxobjsize being set to something */
- if (sd->max_objsize == -1)
- fatal("COSS requires max-size to be set to something other than -1!\n");
---- 855,861 ----
- debug(3, 1) ("Cache COSS dir '%s' size changed to %d KB\n", path, size);
- sd->max_size = size;
- }
-! parse_cachedir_options(sd, options, 1);
- /* Enforce maxobjsize being set to something */
- if (sd->max_objsize == -1)
- fatal("COSS requires max-size to be set to something other than -1!\n");
-***************
-*** 833,838 ****
---- 867,908 ----
- storeAppendPrintf(entry, " %d",
- s->max_size >> 20);
- dump_cachedir_options(entry, NULL, s);
-+ }
-+
-+ static void
-+ storeCossDirParseBlkSize(SwapDir * sd, const char *name, const char *value, int reconfiguring)
-+ {
-+ CossInfo *cs = sd->fsdata;
-+ int blksz = atoi(value);
-+ int check;
-+ int nbits;
-+ if (blksz == (1 << cs->blksz_bits))
-+ /* no change */
-+ return;
-+ if (reconfiguring) {
-+ debug(47, 0) ("WARNING: cannot change COSS block-size while Squid is running\n");
-+ return;
-+ }
-+ nbits = 0;
-+ check = blksz;
-+ while (check > 1) {
-+ nbits++;
-+ check >>= 1;
-+ }
-+ check = 1 << nbits;
-+ if (check != blksz)
-+ fatal("COSS block-size must be a power of 2\n");
-+ if (nbits > 13)
-+ fatal("COSS block-size must be 8192 or smaller\n");
-+ cs->blksz_bits = nbits;
-+ cs->blksz_mask = (1 << cs->blksz_bits) - 1;
-+ }
-+
-+ static void
-+ storeCossDirDumpBlkSize(StoreEntry * e, const char *option, SwapDir * sd)
-+ {
-+ CossInfo *cs = sd->fsdata;
-+ storeAppendPrintf(e, " block-size=%d", 1 << cs->blksz_bits);
- }
-
- #if OLD_UNUSED_CODE
-Index: squid/src/fs/coss/store_io_coss.c
-diff -c squid/src/fs/coss/store_io_coss.c:1.13.2.4 squid/src/fs/coss/store_io_coss.c:1.13.2.6
-*** squid/src/fs/coss/store_io_coss.c:1.13.2.4 Thu Aug 8 14:17:41 2002
---- squid/src/fs/coss/store_io_coss.c Wed Jul 23 15:12:56 2003
-***************
-*** 49,54 ****
---- 49,59 ----
- static CossMemBuf *storeCossCreateMemBuf(SwapDir * SD, size_t start,
- sfileno curfn, int *collision);
- static CBDUNL storeCossIOFreeEntry;
-+ static off_t storeCossFilenoToDiskOffset(sfileno f, CossInfo *);
-+ static sfileno storeCossDiskOffsetToFileno(off_t o, CossInfo *);
-+ static void storeCossMaybeWriteMemBuf(SwapDir * SD, CossMemBuf * t);
-+
-+ static void membuf_describe(CossMemBuf * t, int level, int line);
-
- CBDATA_TYPE(storeIOState);
- CBDATA_TYPE(CossMemBuf);
-***************
-*** 62,68 ****
- * to work..
- * -- Adrian
- */
-! off_t
- storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which)
- {
- CossInfo *cs = (CossInfo *) SD->fsdata;
---- 67,73 ----
- * to work..
- * -- Adrian
- */
-! static sfileno
- storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which)
- {
- CossInfo *cs = (CossInfo *) SD->fsdata;
-***************
-*** 78,85 ****
- else
- checkf = -1;
-
-- retofs = e->swap_filen; /* Just for defaults, or while rebuilding */
--
- if (e->swap_file_sz > 0)
- allocsize = e->swap_file_sz;
- else
---- 83,88 ----
-***************
-*** 96,101 ****
---- 99,105 ----
- */
- cs->current_membuf->flags.full = 1;
- cs->current_membuf->diskend = cs->current_offset - 1;
-+ storeCossMaybeWriteMemBuf(SD, cs->current_membuf);
- cs->current_offset = 0; /* wrap back to beginning */
- debug(79, 2) ("storeCossAllocate: wrap to 0\n");
-
-***************
-*** 109,114 ****
---- 113,119 ----
- */
- cs->current_membuf->flags.full = 1;
- cs->current_offset = cs->current_membuf->diskend + 1;
-+ storeCossMaybeWriteMemBuf(SD, cs->current_membuf);
- debug(79, 2) ("storeCossAllocate: New offset - %ld\n",
- (long int) cs->current_offset);
- newmb = storeCossCreateMemBuf(SD, cs->current_offset, checkf, &coll);
-***************
-*** 118,124 ****
- if (coll == 0) {
- retofs = cs->current_offset;
- cs->current_offset = retofs + allocsize;
-! return retofs;
- } else {
- debug(79, 3) ("storeCossAllocate: Collision\n");
- return -1;
---- 123,131 ----
- if (coll == 0) {
- retofs = cs->current_offset;
- cs->current_offset = retofs + allocsize;
-! /* round up to our blocksize */
-! cs->current_offset = ((cs->current_offset + cs->blksz_mask) >> cs->blksz_bits) << cs->blksz_bits;
-! return storeCossDiskOffsetToFileno(retofs, cs);
- } else {
- debug(79, 3) ("storeCossAllocate: Collision\n");
- return -1;
-***************
-*** 159,165 ****
- sio->st_size = objectLen(e) + e->mem_obj->swap_hdr_sz;
- sio->swap_dirn = SD->index;
- sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_ALLOCATE);
-! debug(79, 3) ("storeCossCreate: offset %d, size %ld, end %ld\n", sio->swap_filen, (long int) sio->st_size, (long int) (sio->swap_filen + sio->st_size));
-
- sio->callback = callback;
- sio->file_callback = file_callback;
---- 166,175 ----
- sio->st_size = objectLen(e) + e->mem_obj->swap_hdr_sz;
- sio->swap_dirn = SD->index;
- sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_ALLOCATE);
-! debug(79, 3) ("storeCossCreate: offset %ld, size %ld, end %ld\n",
-! (long int) storeCossFilenoToDiskOffset(sio->swap_filen, SD->fsdata),
-! (long int) sio->st_size,
-! (long int) (sio->swap_filen + sio->st_size));
-
- sio->callback = callback;
- sio->file_callback = file_callback;
-***************
-*** 211,217 ****
- cstate->flags.reading = 0;
- cstate->readbuffer = NULL;
- cstate->reqdiskoffset = -1;
-! p = storeCossMemPointerFromDiskOffset(SD, f, NULL);
- /* make local copy so we don't have to lock membuf */
- if (p) {
- cstate->readbuffer = xmalloc(sio->st_size);
---- 221,227 ----
- cstate->flags.reading = 0;
- cstate->readbuffer = NULL;
- cstate->reqdiskoffset = -1;
-! p = storeCossMemPointerFromDiskOffset(SD, storeCossFilenoToDiskOffset(f, cs), NULL);
- /* make local copy so we don't have to lock membuf */
- if (p) {
- cstate->readbuffer = xmalloc(sio->st_size);
-***************
-*** 227,234 ****
- * a place for the object here, and the file_read() reads the object
- * into the cossmembuf for later writing ..
- */
-! cstate->reqdiskoffset = sio->swap_filen;
-! sio->swap_filen = -1;
- sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_REALLOC);
- if (sio->swap_filen == -1) {
- /* We have to clean up neatly .. */
---- 237,243 ----
- * a place for the object here, and the file_read() reads the object
- * into the cossmembuf for later writing ..
- */
-! cstate->reqdiskoffset = storeCossFilenoToDiskOffset(sio->swap_filen, cs);
- sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_REALLOC);
- if (sio->swap_filen == -1) {
- /* We have to clean up neatly .. */
-***************
-*** 243,249 ****
-
- /*
- * lock the buffer so it doesn't get swapped out on us
-! * this will get unlocked in storeCossReadDone
- */
- storeCossMemBufLock(SD, sio);
-
---- 252,258 ----
-
- /*
- * lock the buffer so it doesn't get swapped out on us
-! * this will get unlocked in storeCossClose
- */
- storeCossMemBufLock(SD, sio);
-
-***************
-*** 254,263 ****
- storeCossAdd(SD, e);
-
- /*
-! * Since we've reallocated a spot for this object, we need to
-! * write it to the cossmembuf *and* return it in the read ..
- */
-- cstate->readbuffer = NULL;
- }
- return sio;
- }
---- 263,272 ----
- storeCossAdd(SD, e);
-
- /*
-! * NOTE cstate->readbuffer is NULL. We'll actually read
-! * the disk data into the MemBuf in storeCossRead() and
-! * return that pointer back to the caller
- */
- }
- return sio;
- }
-***************
-*** 266,273 ****
- storeCossClose(SwapDir * SD, storeIOState * sio)
- {
- debug(79, 3) ("storeCossClose: offset %d\n", sio->swap_filen);
-! if (FILE_MODE(sio->mode) == O_WRONLY)
-! storeCossMemBufUnlock(SD, sio);
- storeCossIOCallback(sio, 0);
- }
-
---- 275,281 ----
- storeCossClose(SwapDir * SD, storeIOState * sio)
- {
- debug(79, 3) ("storeCossClose: offset %d\n", sio->swap_filen);
-! storeCossMemBufUnlock(SD, sio);
- storeCossIOCallback(sio, 0);
- }
-
-***************
-*** 291,297 ****
- cstate->requestbuf = buf;
- cstate->requestoffset = offset;
- if (cstate->readbuffer == NULL) {
-! p = storeCossMemPointerFromDiskOffset(SD, sio->swap_filen, NULL);
- /* Remember we need to translate the block offset to a disk offset! */
- a_file_read(&cs->aq, cs->fd,
- p,
---- 299,305 ----
- cstate->requestbuf = buf;
- cstate->requestoffset = offset;
- if (cstate->readbuffer == NULL) {
-! p = storeCossMemPointerFromDiskOffset(SD, storeCossFilenoToDiskOffset(sio->swap_filen, cs), NULL);
- /* Remember we need to translate the block offset to a disk offset! */
- a_file_read(&cs->aq, cs->fd,
- p,
-***************
-*** 301,306 ****
---- 309,317 ----
- sio);
- cstate->reqdiskoffset = 0; /* XXX */
- } else {
-+ /*
-+ * It was copied from memory in storeCossOpen()
-+ */
- storeCossReadDone(cs->fd,
- cstate->readbuffer,
- sio->st_size,
-***************
-*** 323,329 ****
- assert(sio->e->mem_obj->object_sz != -1);
-
- debug(79, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size);
-! diskoffset = sio->swap_filen + sio->offset;
- dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf);
- assert(dest != NULL);
- xmemcpy(dest, buf, size);
---- 334,340 ----
- assert(sio->e->mem_obj->object_sz != -1);
-
- debug(79, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size);
-! diskoffset = storeCossFilenoToDiskOffset(sio->swap_filen, SD->fsdata) + sio->offset;
- dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf);
- assert(dest != NULL);
- xmemcpy(dest, buf, size);
-***************
-*** 355,363 ****
- } else {
- if (cstate->readbuffer == NULL) {
- cstate->readbuffer = xmalloc(sio->st_size);
-! p = storeCossMemPointerFromDiskOffset(SD, sio->swap_filen, NULL);
- xmemcpy(cstate->readbuffer, p, sio->st_size);
-- storeCossMemBufUnlock(SD, sio);
- }
- sio->offset += len;
- xmemcpy(cstate->requestbuf, &cstate->readbuffer[cstate->requestoffset],
---- 366,375 ----
- } else {
- if (cstate->readbuffer == NULL) {
- cstate->readbuffer = xmalloc(sio->st_size);
-! p = storeCossMemPointerFromDiskOffset(SD,
-! storeCossFilenoToDiskOffset(sio->swap_filen, SD->fsdata),
-! NULL);
- xmemcpy(cstate->readbuffer, p, sio->st_size);
- }
- sio->offset += len;
- xmemcpy(cstate->requestbuf, &cstate->readbuffer[cstate->requestoffset],
-***************
-*** 377,382 ****
---- 389,395 ----
- {
- CossState *cstate = (CossState *) sio->fsstate;
- debug(79, 3) ("storeCossIOCallback: errflag=%d\n", errflag);
-+ assert(NULL == cstate->locked_membuf);
- xfree(cstate->readbuffer);
- if (cbdataValid(sio->callback_data))
- sio->callback(sio->callback_data, errflag, sio);
-***************
-*** 406,458 ****
- return NULL;
- }
-
-! static void
-! storeCossMemBufLock(SwapDir * SD, storeIOState * e)
- {
-! CossMemBuf *t;
- dlink_node *m;
- CossInfo *cs = (CossInfo *) SD->fsdata;
-!
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! if ((e->swap_filen >= t->diskstart) && (e->swap_filen <= t->diskend)) {
-! debug(79, 3) ("storeCossMemBufLock: locking %p, lockcount %d\n", t, t->lockcount);
-! t->lockcount++;
-! return;
-! }
- }
-! debug(79, 3) ("storeCossMemBufLock: FAILED to lock %p\n", e);
- }
-
- static void
-! storeCossMemBufUnlock(SwapDir * SD, storeIOState * e)
- {
-! CossMemBuf *t;
-! dlink_node *m, *n;
-! CossInfo *cs = (CossInfo *) SD->fsdata;
-
-! for (m = cs->membufs.head; m; m = n) {
-! /*
-! * Note that storeCossWriteMemBuf() might call storeCossWriteMemBufDone
-! * immediately (if the write finishes immediately, of course!) which
-! * will make m = m->next kinda unworkable. So, get the next pointer.
-! */
-! n = m->next;
-! t = m->data;
-! if ((e->swap_filen >= t->diskstart) && (e->swap_filen <= t->diskend)) {
-! t->lockcount--;
-! debug(79, 3) ("storeCossMemBufUnlock: unlocking %p, lockcount %d\n", t, t->lockcount);
-! }
-! if (t->flags.full && !t->flags.writing && !t->lockcount)
-! storeCossWriteMemBuf(SD, t);
-! }
- }
-
- void
- storeCossSync(SwapDir * SD)
- {
- CossInfo *cs = (CossInfo *) SD->fsdata;
-- CossMemBuf *t;
- dlink_node *m;
- int end;
-
---- 419,483 ----
- return NULL;
- }
-
-! static CossMemBuf *
-! storeCossFilenoToMembuf(SwapDir * SD, sfileno s)
- {
-! CossMemBuf *t = NULL;
- dlink_node *m;
- CossInfo *cs = (CossInfo *) SD->fsdata;
-! off_t o = storeCossFilenoToDiskOffset(s, cs);
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! if ((o >= t->diskstart) && (o <= t->diskend))
-! break;
- }
-! assert(t);
-! return t;
- }
-
- static void
-! storeCossMemBufLock(SwapDir * SD, storeIOState * sio)
- {
-! CossMemBuf *t = storeCossFilenoToMembuf(SD, sio->swap_filen);
-! CossState *cstate = (CossState *) sio->fsstate;
-! debug(79, 3) ("storeCossMemBufLock: locking %p, lockcount %d\n",
-! t, t->lockcount);
-! cstate->locked_membuf = t;
-! t->lockcount++;
-! }
-
-! static void
-! storeCossMemBufUnlock(SwapDir * SD, storeIOState * sio)
-! {
-! CossState *cstate = (CossState *) sio->fsstate;
-! CossMemBuf *t = cstate->locked_membuf;
-! if (NULL == t)
-! return;
-! debug(79, 3) ("storeCossMemBufUnlock: unlocking %p, lockcount %d\n",
-! t, t->lockcount);
-! t->lockcount--;
-! cstate->locked_membuf = NULL;
-! storeCossMaybeWriteMemBuf(SD, t);
-! }
-!
-! static void
-! storeCossMaybeWriteMemBuf(SwapDir * SD, CossMemBuf * t)
-! {
-! membuf_describe(t, 3, __LINE__);
-! if (!t->flags.full)
-! debug(79, 3) ("membuf %p not full\n", t);
-! else if (t->flags.writing)
-! debug(79, 3) ("membuf %p writing\n", t);
-! else if (t->lockcount)
-! debug(79, 3) ("membuf %p lockcount=%d\n", t, t->lockcount);
-! else
-! storeCossWriteMemBuf(SD, t);
- }
-
- void
- storeCossSync(SwapDir * SD)
- {
- CossInfo *cs = (CossInfo *) SD->fsdata;
- dlink_node *m;
- int end;
-
-***************
-*** 463,471 ****
- if (!cs->membufs.head)
- return;
- for (m = cs->membufs.head; m; m = m->next) {
-! t = m->data;
-! if (t->flags.writing)
- sleep(5); /* XXX EEEWWW! */
- lseek(cs->fd, t->diskstart, SEEK_SET);
- end = (t == cs->current_membuf) ? cs->current_offset : t->diskend;
- FD_WRITE_METHOD(cs->fd, t->buffer, end - t->diskstart);
---- 488,498 ----
- if (!cs->membufs.head)
- return;
- for (m = cs->membufs.head; m; m = m->next) {
-! CossMemBuf *t = m->data;
-! if (t->flags.writing) {
-! debug(79, 1) ("WARNING: sleeping for 5 seconds in storeCossSync()\n");
- sleep(5); /* XXX EEEWWW! */
-+ }
- lseek(cs->fd, t->diskstart, SEEK_SET);
- end = (t == cs->current_membuf) ? cs->current_offset : t->diskend;
- FD_WRITE_METHOD(cs->fd, t->buffer, end - t->diskstart);
-***************
-*** 523,543 ****
- dlinkAdd(newmb, &newmb->node, &cs->membufs);
-
- /* Print out the list of membufs */
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! debug(79, 3) ("storeCossCreateMemBuf: membuflist %ld lockcount %d\n", (long int) t->diskstart, t->lockcount);
- }
-
- /*
- * Kill objects from the tail to make space for a new chunk
- */
- for (m = cs->index.tail; m; m = prev) {
- prev = m->prev;
- e = m->data;
- if (curfn == e->swap_filen)
- *collision = 1; /* Mark an object alloc collision */
-! if ((e->swap_filen >= newmb->diskstart) &&
-! (e->swap_filen <= newmb->diskend)) {
- storeRelease(e);
- numreleased++;
- } else
---- 550,573 ----
- dlinkAdd(newmb, &newmb->node, &cs->membufs);
-
- /* Print out the list of membufs */
-+ debug(79, 3) ("storeCossCreateMemBuf: membuflist:\n");
- for (m = cs->membufs.head; m; m = m->next) {
- t = m->data;
-! membuf_describe(t, 3, __LINE__);
- }
-
- /*
- * Kill objects from the tail to make space for a new chunk
- */
- for (m = cs->index.tail; m; m = prev) {
-+ off_t o;
- prev = m->prev;
- e = m->data;
-+ o = storeCossFilenoToDiskOffset(e->swap_filen, cs);
- if (curfn == e->swap_filen)
- *collision = 1; /* Mark an object alloc collision */
-! if ((o >= newmb->diskstart) &&
-! (o <= newmb->diskend)) {
- storeRelease(e);
- numreleased++;
- } else
-***************
-*** 567,570 ****
---- 597,624 ----
- storeCossIOFreeEntry(void *sio)
- {
- memPoolFree(coss_state_pool, ((storeIOState *) sio)->fsstate);
-+ }
-+
-+ static off_t
-+ storeCossFilenoToDiskOffset(sfileno f, CossInfo * cs)
-+ {
-+ return (off_t) f << cs->blksz_bits;
-+ }
-+
-+ static sfileno
-+ storeCossDiskOffsetToFileno(off_t o, CossInfo * cs)
-+ {
-+ assert(0 == (o & cs->blksz_mask));
-+ return o >> cs->blksz_bits;
-+ }
-+
-+ static void
-+ membuf_describe(CossMemBuf * t, int level, int line)
-+ {
-+ debug(79, level) ("membuf %p, LC:%02d, ST:%010lu, FL:%c%c\n",
-+ t,
-+ t->lockcount,
-+ (unsigned long) t->diskstart,
-+ t->flags.full ? 'F' : '.',
-+ t->flags.writing ? 'W' : '.');
- }
+++ /dev/null
-Index: squid/src/errorpage.c
-diff -c squid/src/errorpage.c:1.167.2.7 squid/src/errorpage.c:1.167.2.8
-*** squid/src/errorpage.c:1.167.2.7 Wed May 21 08:34:38 2003
---- squid/src/errorpage.c Tue May 27 01:20:55 2003
-***************
-*** 223,229 ****
- return i;
- }
- for (i = 0; i < ErrorDynamicPages.count; i++) {
-! if (strcmp(((ErrorDynamicPageInfo *) ErrorDynamicPages.items[i - ERR_MAX])->page_name, page_name) == 0)
- return i + ERR_MAX;
- }
- return ERR_NONE;
---- 223,229 ----
- return i;
- }
- for (i = 0; i < ErrorDynamicPages.count; i++) {
-! if (strcmp(((ErrorDynamicPageInfo *) ErrorDynamicPages.items[i])->page_name, page_name) == 0)
- return i + ERR_MAX;
- }
- return ERR_NONE;
+++ /dev/null
-Index: squid/src/main.c
-diff -c squid/src/main.c:1.345.2.10 squid/src/main.c:1.345.2.11
-*** squid/src/main.c:1.345.2.10 Mon May 5 18:24:14 2003
---- squid/src/main.c Sun Jun 8 17:28:46 2003
-***************
-*** 881,886 ****
---- 881,888 ----
- */
- /* Connect stdio to /dev/null in daemon mode */
- nullfd = open("/dev/null", O_RDWR | O_TEXT);
-+ if (nullfd < 0)
-+ fatalf("/dev/null: %s\n", xstrerror());
- dup2(nullfd, 0);
- if (opt_debug_stderr < 0) {
- dup2(nullfd, 1);
+++ /dev/null
-Index: squid/src/auth/digest/auth_digest.c
-diff -c squid/src/auth/digest/auth_digest.c:1.10.2.6 squid/src/auth/digest/auth_digest.c:1.10.2.7
-*** squid/src/auth/digest/auth_digest.c:1.10.2.6 Sun May 18 15:49:20 2003
---- squid/src/auth/digest/auth_digest.c Sun Aug 10 01:31:33 2003
-***************
-*** 711,718 ****
- return;
- } else {
- const char *useragent = httpHeaderGetStr(&request->header, HDR_USER_AGENT);
-! static struct in_addr last_broken_addr =
-! {0};
- if (memcmp(&last_broken_addr, &request->client_addr, sizeof(last_broken_addr)) != 0) {
- debug(29, 1) ("\nDigest POST bug detected from %s using '%s'. Please upgrade browser. See Bug #630 for details.\n", inet_ntoa(request->client_addr), useragent ? useragent : "-");
- last_broken_addr = request->client_addr;
---- 711,723 ----
- return;
- } else {
- const char *useragent = httpHeaderGetStr(&request->header, HDR_USER_AGENT);
-! static struct in_addr last_broken_addr;
-! static int seen_broken_client = 0;
-!
-! if (!seen_broken_client) {
-! last_broken_addr = no_addr;
-! seen_broken_client = 1;
-! }
- if (memcmp(&last_broken_addr, &request->client_addr, sizeof(last_broken_addr)) != 0) {
- debug(29, 1) ("\nDigest POST bug detected from %s using '%s'. Please upgrade browser. See Bug #630 for details.\n", inet_ntoa(request->client_addr), useragent ? useragent : "-");
- last_broken_addr = request->client_addr;
+++ /dev/null
-Index: squid/src/external_acl.c
-diff -c squid/src/external_acl.c:1.1.2.25 squid/src/external_acl.c:1.1.2.26
-*** squid/src/external_acl.c:1.1.2.25 Sat May 17 12:35:25 2003
---- squid/src/external_acl.c Tue Jun 17 01:18:16 2003
-***************
-*** 417,422 ****
---- 417,426 ----
- }
- }
- key = makeExternalAclKey(ch, acl);
-+ if (!key) {
-+ /* Not sufficient data to process */
-+ return -1;
-+ }
- ch->auth_user_request = NULL;
- if (entry) {
- if (entry->def != acl->def || strcmp(entry->hash.key, key) != 0) {
-***************
-*** 507,513 ****
- #if USE_IDENT
- case EXT_ACL_IDENT:
- str = ch->rfc931;
-! if (!str) {
- ch->state[ACL_IDENT] = ACL_LOOKUP_NEEDED;
- return NULL;
- }
---- 511,517 ----
- #if USE_IDENT
- case EXT_ACL_IDENT:
- str = ch->rfc931;
-! if (!str || !*str) {
- ch->state[ACL_IDENT] = ACL_LOOKUP_NEEDED;
- return NULL;
- }
+++ /dev/null
-Index: squid/src/http.c
-diff -c squid/src/http.c:1.384.2.8 squid/src/http.c:1.384.2.9
-*** squid/src/http.c:1.384.2.8 Wed Aug 6 07:49:01 2003
---- squid/src/http.c Mon Aug 18 11:24:25 2003
-***************
-*** 856,862 ****
- /* append X-Forwarded-For */
- strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR);
- strListAdd(&strFwd,
-! (orig_request->client_addr.s_addr != no_addr.s_addr ?
- inet_ntoa(orig_request->client_addr) : "unknown"), ',');
- httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd));
- stringClean(&strFwd);
---- 856,862 ----
- /* append X-Forwarded-For */
- strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR);
- strListAdd(&strFwd,
-! (((orig_request->client_addr.s_addr != no_addr.s_addr) && opt_forwarded_for) ?
- inet_ntoa(orig_request->client_addr) : "unknown"), ',');
- httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd));
- stringClean(&strFwd);
+++ /dev/null
-Index: squid/lib/radix.c
-diff -c squid/lib/radix.c:1.16 squid/lib/radix.c:1.16.2.1
-*** squid/lib/radix.c:1.16 Tue Nov 13 12:24:34 2001
---- squid/lib/radix.c Wed Jun 18 17:53:34 2003
-***************
-*** 113,121 ****
-
- #include "radix.h"
-
- int squid_max_keylen;
- struct squid_radix_mask *squid_rn_mkfreelist;
-! struct squid_radix_node_head *squid_mask_rnhead;
- static char *addmask_key;
- static unsigned char normal_chars[] =
- {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF};
---- 113,127 ----
-
- #include "radix.h"
-
-+
- int squid_max_keylen;
- struct squid_radix_mask *squid_rn_mkfreelist;
-! /* Silly construct to get rid of GCC-3.3 warning about type-punning */
-! union {
-! struct squid_radix_node_head *rn;
-! void *ptr;
-! } squid_mask_rnhead_u;
-! #define squid_mask_rnhead squid_mask_rnhead_u.rn
- static char *addmask_key;
- static unsigned char normal_chars[] =
- {0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xFF};
-***************
-*** 981,987 ****
- addmask_key = cplim = rn_ones + squid_max_keylen;
- while (cp < cplim)
- *cp++ = -1;
-! if (squid_rn_inithead((void **) &squid_mask_rnhead, 0) == 0) {
- fprintf(stderr, "rn_init2 failed.\n");
- exit(-1);
- }
---- 987,993 ----
- addmask_key = cplim = rn_ones + squid_max_keylen;
- while (cp < cplim)
- *cp++ = -1;
-! if (squid_rn_inithead(&squid_mask_rnhead_u.ptr, 0) == 0) {
- fprintf(stderr, "rn_init2 failed.\n");
- exit(-1);
- }
-Index: squid/lib/rfc1738.c
-diff -c squid/lib/rfc1738.c:1.23 squid/lib/rfc1738.c:1.23.2.1
-*** squid/lib/rfc1738.c:1.23 Wed Feb 7 11:56:51 2001
---- squid/lib/rfc1738.c Wed Jun 18 17:53:34 2003
-***************
-*** 128,135 ****
- do_escape = 1;
- }
- /* RFC 1738 says any non-US-ASCII are encoded */
-! if (((unsigned char) *p >= (unsigned char) 0x80) &&
-! ((unsigned char) *p <= (unsigned char) 0xFF)) {
- do_escape = 1;
- }
- /* Do the triplet encoding, or just copy the char */
---- 128,134 ----
- do_escape = 1;
- }
- /* RFC 1738 says any non-US-ASCII are encoded */
-! if (((unsigned char) *p >= (unsigned char) 0x80)) {
- do_escape = 1;
- }
- /* Do the triplet encoding, or just copy the char */
-Index: squid/src/asn.c
-diff -c squid/src/asn.c:1.78 squid/src/asn.c:1.78.2.1
-*** squid/src/asn.c:1.78 Tue Nov 13 12:24:35 2001
---- squid/src/asn.c Wed Jun 18 17:53:34 2003
-***************
-*** 50,56 ****
- /* END of definitions for radix tree entries */
-
- /* Head for ip to asn radix tree */
-! struct squid_radix_node_head *AS_tree_head;
-
- /*
- * Structure for as number information. it could be simply
---- 50,62 ----
- /* END of definitions for radix tree entries */
-
- /* Head for ip to asn radix tree */
-! /* Silly union construct to get rid of GCC-3.3 warning */
-! union {
-! struct squid_radix_node_head *rn;
-! void *ptr;
-! } AS_tree_head_u;
-!
-! #define AS_tree_head AS_tree_head_u.rn
-
- /*
- * Structure for as number information. it could be simply
-***************
-*** 160,166 ****
- CBDATA_INIT_TYPE(ASState);
- if (0 == inited++)
- squid_rn_init();
-! squid_rn_inithead((void **) &AS_tree_head, 8);
- asnAclInitialize(Config.aclList);
- cachemgrRegister("asndb", "AS Number Database", asnStats, 0, 1);
- }
---- 166,172 ----
- CBDATA_INIT_TYPE(ASState);
- if (0 == inited++)
- squid_rn_init();
-! squid_rn_inithead(&AS_tree_head_u.ptr, 8);
- asnAclInitialize(Config.aclList);
- cachemgrRegister("asndb", "AS Number Database", asnStats, 0, 1);
- }
-Index: squid/src/delay_pools.c
-diff -c squid/src/delay_pools.c:1.19.2.7 squid/src/delay_pools.c:1.19.2.8
-*** squid/src/delay_pools.c:1.19.2.7 Sun Mar 9 11:41:27 2003
---- squid/src/delay_pools.c Wed Jun 18 17:53:35 2003
-***************
-*** 397,403 ****
- position |= 255;
- if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i % 8)))) {
- delay_data[pool].class3->individual_255_used[i / 8] |= (1 << (i % 8));
-- assert(position < C3_IND_SZ);
- delay_data[pool].class3->individual[position] =
- (int) (((double) Config.Delay.rates[pool]->individual.max_bytes *
- Config.Delay.initial) / 100);
---- 397,402 ----
-***************
-*** 415,421 ****
- assert(j < (IND_MAP_SZ - 1));
- delay_data[pool].class3->individual_map[i][j + 1] = 255;
- position |= j;
-- assert(position < C3_IND_SZ);
- delay_data[pool].class3->individual[position] =
- (int) (((double) Config.Delay.rates[pool]->individual.max_bytes *
- Config.Delay.initial) / 100);
---- 414,419 ----
-Index: squid/src/snmp_core.c
-diff -c squid/src/snmp_core.c:1.51.2.2 squid/src/snmp_core.c:1.51.2.3
-*** squid/src/snmp_core.c:1.51.2.2 Thu Feb 14 12:02:17 2002
---- squid/src/snmp_core.c Wed Jun 18 17:53:35 2003
-***************
-*** 607,616 ****
- return (Answer);
- } else if (PDU->command == SNMP_PDU_GETNEXT) {
- oid *NextOidName = NULL;
-! int NextOidNameLen = 0;
-
- ParseFn = snmpTreeNext(PDU->variables->name, PDU->variables->name_length,
-! &(NextOidName), (snint *) & NextOidNameLen);
-
- if (ParseFn == NULL) {
- Answer->errstat = SNMP_ERR_NOSUCHNAME;
---- 607,616 ----
- return (Answer);
- } else if (PDU->command == SNMP_PDU_GETNEXT) {
- oid *NextOidName = NULL;
-! snint NextOidNameLen = 0;
-
- ParseFn = snmpTreeNext(PDU->variables->name, PDU->variables->name_length,
-! &NextOidName, &NextOidNameLen);
-
- if (ParseFn == NULL) {
- Answer->errstat = SNMP_ERR_NOSUCHNAME;
+++ /dev/null
-Index: squid/src/http.c
-diff -c squid/src/http.c:1.384.2.4 squid/src/http.c:1.384.2.5
-*** squid/src/http.c:1.384.2.4 Sun May 11 11:30:13 2003
---- squid/src/http.c Thu Jun 19 18:18:50 2003
-***************
-*** 913,919 ****
- }
- }
- /* Now mangle the headers. */
-! httpHdrMangleList(hdr_out, request);
- stringClean(&strConnection);
- }
-
---- 913,919 ----
- }
- }
- /* Now mangle the headers. */
-! httpHdrMangleList(hdr_out, orig_request);
- stringClean(&strConnection);
- }
-
+++ /dev/null
-Index: squid/src/http.c
-diff -c squid/src/http.c:1.384.2.5 squid/src/http.c:1.384.2.6
-*** squid/src/http.c:1.384.2.5 Thu Jun 19 18:18:50 2003
---- squid/src/http.c Fri Jul 11 16:40:34 2003
-***************
-*** 795,809 ****
- break;
- case HDR_HOST:
- /*
-! * Normally Squid does not copy the Host: header from
-! * a client request into the forwarded request headers.
-! * However, there is one case when we do: If the URL
- * went through our redirector and the admin configured
- * 'redir_rewrites_host' to be off.
- */
-! if (request->flags.redirected)
-! if (!Config.onoff.redir_rewrites_host)
-! httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));
- break;
- case HDR_IF_MODIFIED_SINCE:
- /* append unless we added our own;
---- 795,816 ----
- break;
- case HDR_HOST:
- /*
-! * Normally Squid rewrites the Host: header.
-! * However, there is one case when we don't: If the URL
- * went through our redirector and the admin configured
- * 'redir_rewrites_host' to be off.
- */
-! if (request->flags.redirected && !Config.onoff.redir_rewrites_host)
-! httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));
-! else {
-! /* use port# only if not default */
-! if (orig_request->port == urlDefaultPort(orig_request->protocol)) {
-! httpHeaderPutStr(hdr_out, HDR_HOST, orig_request->host);
-! } else {
-! httpHeaderPutStrf(hdr_out, HDR_HOST, "%s:%d",
-! orig_request->host, (int) orig_request->port);
-! }
-! }
- break;
- case HDR_IF_MODIFIED_SINCE:
- /* append unless we added our own;
+++ /dev/null
-Index: squid/src/tools.c
-diff -c squid/src/tools.c:1.213.2.6 squid/src/tools.c:1.213.2.8
-*** squid/src/tools.c:1.213.2.6 Tue Apr 29 10:09:40 2003
---- squid/src/tools.c Tue Jun 24 14:52:26 2003
-***************
-*** 987,992 ****
---- 987,993 ----
- char *addr;
- if (buf[0] == '#') /* MS-windows likes to add comments */
- continue;
-+ strtok(buf, "#"); /* chop everything following a comment marker */
- lt = buf;
- addr = buf;
- debug(1, 5) ("etc_hosts: line is '%s'\n", buf);
+++ /dev/null
-Index: squid/src/client_side.c
-diff -c squid/src/client_side.c:1.561.2.38 squid/src/client_side.c:1.561.2.39
-*** squid/src/client_side.c:1.561.2.38 Fri Jul 11 17:19:16 2003
---- squid/src/client_side.c Tue Jul 15 14:05:27 2003
-***************
-*** 1988,1993 ****
---- 1988,1997 ----
- null_request_flags);
- errorAppendEntry(http->entry, err);
- httpReplyDestroy(rep);
-+ /*
-+ * log with TCP_DENIED, the same as for http_access checks
-+ */
-+ http->log_type = LOG_TCP_DENIED;
- memFree(buf, MEM_CLIENT_SOCK_BUF);
- return;
- }
+++ /dev/null
-Index: squid/src/icmp.c
-diff -c squid/src/icmp.c:1.73.2.3 squid/src/icmp.c:1.73.2.4
-*** squid/src/icmp.c:1.73.2.3 Thu Jan 2 16:10:46 2003
---- squid/src/icmp.c Thu Jun 12 17:55:05 2003
-***************
-*** 78,84 ****
- (char *) &preply,
- sizeof(pingerReplyData),
- 0);
-! if (n < 0) {
- debug(50, 1) ("icmpRecv: recv: %s\n", xstrerror());
- if (++fail_count == 10 || errno == ECONNREFUSED)
- icmpClose();
---- 78,84 ----
- (char *) &preply,
- sizeof(pingerReplyData),
- 0);
-! if (n < 0 && EAGAIN != errno) {
- debug(50, 1) ("icmpRecv: recv: %s\n", xstrerror());
- if (++fail_count == 10 || errno == ECONNREFUSED)
- icmpClose();
+++ /dev/null
-Index: squid/src/http.c
-diff -c squid/src/http.c:1.384.2.6 squid/src/http.c:1.384.2.7
-*** squid/src/http.c:1.384.2.6 Fri Jul 11 16:40:34 2003
---- squid/src/http.c Tue Jul 15 14:16:12 2003
-***************
-*** 906,911 ****
---- 906,915 ----
- if (strLen(request->urlpath))
- assert(strstr(url, strBuf(request->urlpath)));
- }
-+ /* Set no-cache if determined needed but not found */
-+ if (orig_request->flags.nocache && !httpHeaderHas(hdr_in, HDR_PRAGMA))
-+ EBIT_SET(cc->mask, CC_NO_CACHE);
-+ /* Enforce sibling relations */
- if (flags.only_if_cached)
- EBIT_SET(cc->mask, CC_ONLY_IF_CACHED);
- httpHeaderPutCc(hdr_out, cc);
+++ /dev/null
-Index: squid/src/access_log.c
-diff -c squid/src/access_log.c:1.72.2.2 squid/src/access_log.c:1.72.2.3
-*** squid/src/access_log.c:1.72.2.2 Sun Jun 16 05:25:40 2002
---- squid/src/access_log.c Mon Jun 9 15:54:04 2003
-***************
-*** 147,156 ****
- #endif
- if (c <= 0x1F
- || c >= 0x7F
- #if OLD_LOG_MIME
- || c == '"'
- || c == '#'
-- || c == '%'
- || c == ';'
- || c == '<'
- || c == '>'
---- 147,156 ----
- #endif
- if (c <= 0x1F
- || c >= 0x7F
-+ || c == '%'
- #if OLD_LOG_MIME
- || c == '"'
- || c == '#'
- || c == ';'
- || c == '<'
- || c == '>'
-***************
-*** 210,215 ****
---- 210,216 ----
- *buf_cursor++ = 'n';
- } else if (c <= 0x1F
- || c >= 0x7F
-+ || c == '%'
- || c == ' ') {
- *buf_cursor++ = '%';
- i = c * 2;
+++ /dev/null
-Index: squid/src/structs.h
-diff -c squid/src/structs.h:1.408.2.12 squid/src/structs.h:1.408.2.13
-*** squid/src/structs.h:1.408.2.12 Tue Jul 1 14:42:42 2003
---- squid/src/structs.h Wed Aug 6 07:49:03 2003
-***************
-*** 1492,1498 ****
- struct timeval start_ping;
- IRCB *ping_reply_callback;
- void *ircb_data;
-- int fd; /* FD of client creating this entry */
- struct {
- STABH *callback;
- void *data;
---- 1492,1497 ----
-Index: squid/src/http.c
-diff -c squid/src/http.c:1.384.2.7 squid/src/http.c:1.384.2.8
-*** squid/src/http.c:1.384.2.7 Tue Jul 15 14:16:12 2003
---- squid/src/http.c Wed Aug 6 07:49:01 2003
-***************
-*** 721,727 ****
- request_t * orig_request,
- StoreEntry * entry,
- HttpHeader * hdr_out,
-- int cfd,
- http_state_flags flags)
- {
- /* building buffer for complex strings */
---- 721,726 ----
-***************
-*** 856,862 ****
-
- /* append X-Forwarded-For */
- strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR);
-! strListAdd(&strFwd, (cfd < 0 ? "unknown" : fd_table[cfd].ipaddr), ',');
- httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd));
- stringClean(&strFwd);
-
---- 855,863 ----
-
- /* append X-Forwarded-For */
- strFwd = httpHeaderGetList(hdr_in, HDR_X_FORWARDED_FOR);
-! strListAdd(&strFwd,
-! (orig_request->client_addr.s_addr != no_addr.s_addr ?
-! inet_ntoa(orig_request->client_addr) : "unknown"), ',');
- httpHeaderPutStr(hdr_out, HDR_X_FORWARDED_FOR, strBuf(strFwd));
- stringClean(&strFwd);
-
-***************
-*** 935,941 ****
- request_t * orig_request,
- StoreEntry * entry,
- MemBuf * mb,
-- int cfd,
- http_state_flags flags)
- {
- const int offset = mb->size;
---- 936,941 ----
-***************
-*** 946,952 ****
- {
- HttpHeader hdr;
- Packer p;
-! httpBuildRequestHeader(request, orig_request, entry, &hdr, cfd, flags);
- packerToMemInit(&p, mb);
- httpHeaderPackInto(&hdr, &p);
- httpHeaderClean(&hdr);
---- 946,952 ----
- {
- HttpHeader hdr;
- Packer p;
-! httpBuildRequestHeader(request, orig_request, entry, &hdr, flags);
- packerToMemInit(&p, mb);
- httpHeaderPackInto(&hdr, &p);
- httpHeaderClean(&hdr);
-***************
-*** 963,969 ****
- MemBuf mb;
- request_t *req = httpState->request;
- StoreEntry *entry = httpState->entry;
-- int cfd;
- peer *p = httpState->peer;
- CWCB *sendHeaderDone;
-
---- 963,968 ----
-***************
-*** 974,986 ****
- else
- sendHeaderDone = httpSendComplete;
-
-- if (!opt_forwarded_for)
-- cfd = -1;
-- else if (entry->mem_obj == NULL)
-- cfd = -1;
-- else
-- cfd = entry->mem_obj->fd;
-- assert(-1 == cfd || FD_SOCKET == fd_table[cfd].type);
- if (p != NULL)
- httpState->flags.proxying = 1;
- else
---- 973,978 ----
-***************
-*** 1005,1011 ****
- httpState->orig_request,
- entry,
- &mb,
-- cfd,
- httpState->flags);
- debug(11, 6) ("httpSendRequest: FD %d:\n%s\n", httpState->fd, mb.buf);
- comm_write_mbuf(httpState->fd, mb, sendHeaderDone, httpState);
---- 997,1002 ----
-Index: squid/src/store_client.c
-diff -c squid/src/store_client.c:1.105.2.1 squid/src/store_client.c:1.105.2.2
-*** squid/src/store_client.c:1.105.2.1 Wed Jan 22 18:57:02 2003
---- squid/src/store_client.c Wed Aug 6 07:49:03 2003
-***************
-*** 511,523 ****
- return 0;
- if (mem->clients.head == NULL)
- return 0;
-- if (sc == mem->clients.head->data) {
-- /*
-- * If we are unregistering the _first_ client for this
-- * entry, then we have to reset the client FD to -1.
-- */
-- mem->fd = -1;
-- }
- dlinkDelete(&sc->node, &mem->clients);
- mem->nclients--;
- if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE)
---- 511,516 ----
-Index: squid/src/store.c
-diff -c squid/src/store.c:1.544.2.3 squid/src/store.c:1.544.2.4
-*** squid/src/store.c:1.544.2.3 Mon Jun 23 10:50:56 2003
---- squid/src/store.c Wed Aug 6 07:49:02 2003
-***************
-*** 121,127 ****
- #endif
- mem->log_url = xstrdup(log_url);
- mem->object_sz = -1;
-- mem->fd = -1;
- /* XXX account log_url */
- debug(20, 3) ("new_MemObject: returning %p\n", mem);
- return mem;
---- 121,126 ----
-***************
-*** 155,165 ****
- assert(mem->swapout.sio == NULL);
- stmemFree(&mem->data_hdr);
- mem->inmem_hi = 0;
- /*
- * There is no way to abort FD-less clients, so they might
-! * still have mem->clients set if mem->fd == -1
- */
-! assert(mem->fd == -1 || mem->clients.head == NULL);
- httpReplyDestroy(mem->reply);
- requestUnlink(mem->request);
- mem->request = NULL;
---- 154,166 ----
- assert(mem->swapout.sio == NULL);
- stmemFree(&mem->data_hdr);
- mem->inmem_hi = 0;
-+ #if 0
- /*
- * There is no way to abort FD-less clients, so they might
-! * still have mem->clients set.
- */
-! assert(mem->clients.head == NULL);
-! #endif
- httpReplyDestroy(mem->reply);
- requestUnlink(mem->request);
- mem->request = NULL;
-Index: squid/src/protos.h
-diff -c squid/src/protos.h:1.420.2.18 squid/src/protos.h:1.420.2.19
-*** squid/src/protos.h:1.420.2.18 Tue May 6 14:13:02 2003
---- squid/src/protos.h Wed Aug 6 07:49:02 2003
-***************
-*** 309,320 ****
- request_t * orig_request,
- StoreEntry * entry,
- MemBuf * mb,
-- int cfd,
- http_state_flags);
- extern void httpAnonInitModule(void);
- extern int httpAnonHdrAllowed(http_hdr_type hdr_id);
- extern int httpAnonHdrDenied(http_hdr_type hdr_id);
-! extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, int, http_state_flags);
- extern void httpBuildVersion(http_version_t * version, unsigned int major, unsigned int minor);
- extern const char *httpMakeVaryMark(request_t * request, HttpReply * reply);
-
---- 309,319 ----
- request_t * orig_request,
- StoreEntry * entry,
- MemBuf * mb,
- http_state_flags);
- extern void httpAnonInitModule(void);
- extern int httpAnonHdrAllowed(http_hdr_type hdr_id);
- extern int httpAnonHdrDenied(http_hdr_type hdr_id);
-! extern void httpBuildRequestHeader(request_t *, request_t *, StoreEntry *, HttpHeader *, http_state_flags);
- extern void httpBuildVersion(http_version_t * version, unsigned int major, unsigned int minor);
- extern const char *httpMakeVaryMark(request_t * request, HttpReply * reply);
-
-Index: squid/src/forward.c
-diff -c squid/src/forward.c:1.82.2.3 squid/src/forward.c:1.82.2.4
-*** squid/src/forward.c:1.82.2.3 Mon Mar 17 11:34:19 2003
---- squid/src/forward.c Wed Aug 6 07:49:01 2003
-***************
-*** 612,618 ****
- }
- debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e));
- e->mem_obj->request = requestLink(r);
-- e->mem_obj->fd = fd;
- #if URL_CHECKSUM_DEBUG
- assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
- #endif
---- 612,617 ----
-Index: squid/src/htcp.c
-diff -c squid/src/htcp.c:1.38.2.3 squid/src/htcp.c:1.38.2.4
-*** squid/src/htcp.c:1.38.2.3 Sun May 11 11:30:13 2003
---- squid/src/htcp.c Wed Aug 6 07:49:01 2003
-***************
-*** 919,925 ****
- stuff.S.method = (char *) RequestMethodStr[req->method];
- stuff.S.uri = (char *) storeUrl(e);
- stuff.S.version = vbuf;
-! httpBuildRequestHeader(req, req, e, &hdr, -1, flags);
- memBufDefInit(&mb);
- packerToMemInit(&pa, &mb);
- httpHeaderPackInto(&hdr, &pa);
---- 919,925 ----
- stuff.S.method = (char *) RequestMethodStr[req->method];
- stuff.S.uri = (char *) storeUrl(e);
- stuff.S.version = vbuf;
-! httpBuildRequestHeader(req, req, e, &hdr, flags);
- memBufDefInit(&mb);
- packerToMemInit(&pa, &mb);
- httpHeaderPackInto(&hdr, &pa);
-Index: squid/src/ssl.c
-diff -c squid/src/ssl.c:1.118.2.3 squid/src/ssl.c:1.118.2.4
-*** squid/src/ssl.c:1.118.2.3 Sun Feb 9 14:42:03 2003
---- squid/src/ssl.c Wed Aug 6 07:49:02 2003
-***************
-*** 556,562 ****
- sslState->request,
- NULL, /* StoreEntry */
- &hdr_out,
-- sslState->client.fd,
- flags); /* flags */
- packerToMemInit(&p, &mb);
- httpHeaderPackInto(&hdr_out, &p);
---- 556,561 ----
+++ /dev/null
-Index: squid/src/stat.c
-diff -c squid/src/stat.c:1.351.2.8 squid/src/stat.c:1.351.2.9
-*** squid/src/stat.c:1.351.2.8 Sun Jan 26 22:00:46 2003
---- squid/src/stat.c Sun Jun 22 15:32:10 2003
-***************
-*** 950,955 ****
---- 950,957 ----
- #elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO
- struct mallinfo mp = mallinfo();
- i = mp.arena;
-+ #elif HAVE_SBRK
-+ i = (size_t) ((char *) sbrk(0) - (char *) sbrk_start);
- #endif
- if (Config.warnings.high_memory < i)
- debug(18, 0) ("WARNING: Memory usage at %d MB\n", i >> 20);
+++ /dev/null
-Index: squid/src/cache_cf.c
-diff -c squid/src/cache_cf.c:1.396.2.13 squid/src/cache_cf.c:1.396.2.14
-*** squid/src/cache_cf.c:1.396.2.13 Wed Feb 5 22:01:07 2003
---- squid/src/cache_cf.c Tue Jul 1 14:42:41 2003
-***************
-*** 350,357 ****
- Config.appendDomainLen = 0;
- safe_free(debug_options)
- debug_options = xstrdup(Config.debugOptions);
-- if (Config.retry.timeout < 5)
-- fatal("minimum_retry_timeout must be at least 5 seconds");
- if (Config.retry.maxtries > 10)
- fatal("maximum_single_addr_tries cannot be larger than 10");
- if (Config.retry.maxtries < 1) {
---- 350,355 ----
-Index: squid/src/cf.data.pre
-diff -c squid/src/cf.data.pre:1.245.2.46 squid/src/cf.data.pre:1.245.2.47
-*** squid/src/cf.data.pre:1.245.2.46 Thu Jun 19 15:29:48 2003
---- squid/src/cf.data.pre Tue Jul 1 14:42:41 2003
-***************
-*** 3086,3113 ****
- directory and point this tag at them.
- DOC_END
-
-- NAME: minimum_retry_timeout
-- COMMENT: (seconds)
-- TYPE: time_t
-- LOC: Config.retry.timeout
-- DEFAULT: 5 seconds
-- DOC_START
-- This specifies the minimum connect timeout, for when the
-- connect timeout is reduced to compensate for the availability
-- of multiple IP addresses.
--
-- When a connection to a host is initiated, and that host has
-- several IP addresses, the default connection timeout is reduced
-- by dividing it by the number of addresses. So, a site with 15
-- addresses would then have a timeout of 8 seconds for each
-- address attempted. To avoid having the timeout reduced to the
-- point where even a working host would not have a chance to
-- respond, this setting is provided. The default, and the
-- minimum value, is five seconds, and the maximum value is sixty
-- seconds, or half of connect_timeout, whichever is greater and
-- less than connect_timeout.
-- DOC_END
--
- NAME: maximum_single_addr_tries
- TYPE: int
- LOC: Config.retry.maxtries
---- 3086,3091 ----
-Index: squid/src/structs.h
-diff -c squid/src/structs.h:1.408.2.11 squid/src/structs.h:1.408.2.12
-*** squid/src/structs.h:1.408.2.11 Sat May 10 16:17:44 2003
---- squid/src/structs.h Tue Jul 1 14:42:42 2003
-***************
-*** 638,644 ****
- } icons;
- char *errorDirectory;
- struct {
-- time_t timeout;
- int maxtries;
- } retry;
- struct {
---- 638,643 ----
+++ /dev/null
-Index: squid/src/neighbors.c
-diff -c squid/src/neighbors.c:1.299.2.2 squid/src/neighbors.c:1.299.2.3
-*** squid/src/neighbors.c:1.299.2.2 Tue Aug 27 22:41:16 2002
---- squid/src/neighbors.c Tue Aug 12 18:28:19 2003
-***************
-*** 430,435 ****
---- 430,436 ----
- int peers_pinged = 0;
- int parent_timeout = 0, parent_exprep = 0;
- int sibling_timeout = 0, sibling_exprep = 0;
-+ int mcast_timeout = 0, mcast_exprep = 0;
-
- if (Config.peers == NULL)
- return 0;
-***************
-*** 490,496 ****
- * says a multicast peer is dead.
- */
- p->stats.last_reply = squid_curtime;
-! (*exprep) += p->mcast.n_replies_expected;
- } else if (neighborUp(p)) {
- /* its alive, expect a reply from it */
- if (neighborType(p, request) == PEER_PARENT) {
---- 491,498 ----
- * says a multicast peer is dead.
- */
- p->stats.last_reply = squid_curtime;
-! mcast_exprep += p->mcast.n_replies_expected;
-! mcast_timeout += (p->stats.rtt * p->mcast.n_replies_expected);
- } else if (neighborUp(p)) {
- /* its alive, expect a reply from it */
- if (neighborType(p, request) == PEER_PARENT) {
-***************
-*** 551,557 ****
- /*
- * How many replies to expect?
- */
-! *exprep = parent_exprep + sibling_exprep;
-
- /*
- * If there is a configured timeout, use it
---- 553,559 ----
- /*
- * How many replies to expect?
- */
-! *exprep = parent_exprep + sibling_exprep + mcast_exprep;
-
- /*
- * If there is a configured timeout, use it
-***************
-*** 562,567 ****
---- 564,571 ----
- if (*exprep > 0) {
- if (parent_exprep)
- *timeout = 2 * parent_timeout / parent_exprep;
-+ else if (mcast_exprep)
-+ *timeout = 2 * mcast_timeout / mcast_exprep;
- else
- *timeout = 2 * sibling_timeout / sibling_exprep;
- } else
+++ /dev/null
-Index: squid/helpers/basic_auth/NCSA/ncsa_auth.c
-diff -c squid/helpers/basic_auth/NCSA/ncsa_auth.c:1.1.2.1 squid/helpers/basic_auth/NCSA/ncsa_auth.c:1.1.2.2
-*** squid/helpers/basic_auth/NCSA/ncsa_auth.c:1.1.2.1 Sun Aug 11 19:13:39 2002
---- squid/helpers/basic_auth/NCSA/ncsa_auth.c Wed Aug 20 06:35:51 2003
-***************
-*** 80,85 ****
---- 80,89 ----
- exit(1);
- }
- f = fopen(passwdfile, "r");
-+ if (NULL == f) {
-+ fprintf(stderr, "%s: %s\n", passwdfile, xstrerror());
-+ exit(1);
-+ }
- while (fgets(buf, 8192, f) != NULL) {
- if ((buf[0] == '#') || (buf[0] == ' ') || (buf[0] == '\t') ||
- (buf[0] == '\n'))
+++ /dev/null
-Index: squid/src/cf.data.pre
-diff -c squid/src/cf.data.pre:1.245.2.45 squid/src/cf.data.pre:1.245.2.46
-*** squid/src/cf.data.pre:1.245.2.45 Tue Jun 10 14:45:58 2003
---- squid/src/cf.data.pre Thu Jun 19 15:29:48 2003
-***************
-*** 416,422 ****
- DEFAULT: none
- LOC: none
- DOC_START
-! usage: neighbor_type_domain parent|sibling domain domain ...
-
- Modifying the neighbor type for specific domains is now
- possible. You can treat some domains differently than the the
---- 416,422 ----
- DEFAULT: none
- LOC: none
- DOC_START
-! usage: neighbor_type_domain neighbor parent|sibling domain domain ...
-
- Modifying the neighbor type for specific domains is now
- possible. You can treat some domains differently than the the
+++ /dev/null
-Index: squid/src/peer_digest.c
-diff -c squid/src/peer_digest.c:1.83 squid/src/peer_digest.c:1.83.2.1
-*** squid/src/peer_digest.c:1.83 Wed Oct 24 00:55:44 2001
---- squid/src/peer_digest.c Wed Jul 16 14:22:39 2003
-***************
-*** 688,694 ****
-
- if (fetch->old_entry) {
- debug(72, 2) ("peerDigestFetchFinish: deleting old entry\n");
-! storeUnregister(fetch->sc, fetch->old_entry, fetch);
- storeReleaseRequest(fetch->old_entry);
- storeUnlockObject(fetch->old_entry);
- fetch->old_entry = NULL;
---- 688,694 ----
-
- if (fetch->old_entry) {
- debug(72, 2) ("peerDigestFetchFinish: deleting old entry\n");
-! storeUnregister(fetch->old_sc, fetch->old_entry, fetch);
- storeReleaseRequest(fetch->old_entry);
- storeUnlockObject(fetch->old_entry);
- fetch->old_entry = NULL;
+++ /dev/null
-Index: squid/src/client_side.c
-diff -c squid/src/client_side.c:1.561.2.37 squid/src/client_side.c:1.561.2.38
-*** squid/src/client_side.c:1.561.2.37 Wed Jul 9 15:56:43 2003
---- squid/src/client_side.c Fri Jul 11 17:19:16 2003
-***************
-*** 1955,1960 ****
---- 1955,1961 ----
- null_request_flags);
- errorAppendEntry(http->entry, err);
- httpReplyDestroy(rep);
-+ memFree(buf, MEM_CLIENT_SOCK_BUF);
- return;
- }
- body_size = size - rep->hdr_sz;
-***************
-*** 1987,1992 ****
---- 1988,1994 ----
- null_request_flags);
- errorAppendEntry(http->entry, err);
- httpReplyDestroy(rep);
-+ memFree(buf, MEM_CLIENT_SOCK_BUF);
- return;
- }
- } else if (size < CLIENT_SOCK_SZ && entry->store_status == STORE_PENDING) {
+++ /dev/null
-Index: squid/src/cf.data.pre
-diff -c squid/src/cf.data.pre:1.245.2.44 squid/src/cf.data.pre:1.245.2.45
-*** squid/src/cf.data.pre:1.245.2.44 Wed May 28 20:59:46 2003
---- squid/src/cf.data.pre Tue Jun 10 14:45:58 2003
-***************
-*** 3466,3472 ****
- URI. Options:
-
- strip: The whitespace characters are stripped out of the URL.
-! This is the behavior recommended by RFC2616.
- deny: The request is denied. The user receives an "Invalid
- Request" message.
- allow: The request is allowed and the URI is not changed. The
---- 3466,3472 ----
- URI. Options:
-
- strip: The whitespace characters are stripped out of the URL.
-! This is the behavior recommended by RFC2396.
- deny: The request is denied. The user receives an "Invalid
- Request" message.
- allow: The request is allowed and the URI is not changed. The
+++ /dev/null
-Index: squid/src/store_dir.c
-diff -c squid/src/store_dir.c:1.135.2.1 squid/src/store_dir.c:1.135.2.2
-*** squid/src/store_dir.c:1.135.2.1 Mon Apr 1 05:33:47 2002
---- squid/src/store_dir.c Thu Jul 17 09:39:49 2003
-***************
-*** 153,159 ****
- continue;
- if (sd->cur_size > sd->max_size)
- continue;
-! if (!storeDirValidSwapDirSize(i, objsize))
- continue;
- /* check for error or overload condition */
- load = sd->checkobj(sd, e);
---- 153,159 ----
- continue;
- if (sd->cur_size > sd->max_size)
- continue;
-! if (!storeDirValidSwapDirSize(dirn, objsize))
- continue;
- /* check for error or overload condition */
- load = sd->checkobj(sd, e);
+++ /dev/null
-Index: squid/src/store.c
-diff -c squid/src/store.c:1.544.2.2 squid/src/store.c:1.544.2.3
-*** squid/src/store.c:1.544.2.2 Thu Jan 30 22:13:52 2003
---- squid/src/store.c Mon Jun 23 10:50:56 2003
-***************
-*** 618,632 ****
- store_check_cachable_hist.no.non_get++;
- } else
- #endif
-! if (!EBIT_TEST(e->flags, ENTRY_CACHABLE)) {
-! debug(20, 2) ("storeCheckCachable: NO: not cachable\n");
-! store_check_cachable_hist.no.not_entry_cachable++;
- } else if (EBIT_TEST(e->flags, RELEASE_REQUEST)) {
- debug(20, 2) ("storeCheckCachable: NO: release requested\n");
- store_check_cachable_hist.no.release_request++;
-! } else if (e->store_status == STORE_OK && EBIT_TEST(e->flags, ENTRY_BAD_LENGTH)) {
-! debug(20, 2) ("storeCheckCachable: NO: wrong content-length\n");
-! store_check_cachable_hist.no.wrong_content_length++;
- } else if (EBIT_TEST(e->flags, ENTRY_NEGCACHED)) {
- debug(20, 3) ("storeCheckCachable: NO: negative cached\n");
- store_check_cachable_hist.no.negative_cached++;
---- 618,632 ----
- store_check_cachable_hist.no.non_get++;
- } else
- #endif
-! if (e->store_status == STORE_OK && EBIT_TEST(e->flags, ENTRY_BAD_LENGTH)) {
-! debug(20, 2) ("storeCheckCachable: NO: wrong content-length\n");
-! store_check_cachable_hist.no.wrong_content_length++;
- } else if (EBIT_TEST(e->flags, RELEASE_REQUEST)) {
- debug(20, 2) ("storeCheckCachable: NO: release requested\n");
- store_check_cachable_hist.no.release_request++;
-! } else if (!EBIT_TEST(e->flags, ENTRY_CACHABLE)) {
-! debug(20, 2) ("storeCheckCachable: NO: not cachable\n");
-! store_check_cachable_hist.no.not_entry_cachable++;
- } else if (EBIT_TEST(e->flags, ENTRY_NEGCACHED)) {
- debug(20, 3) ("storeCheckCachable: NO: negative cached\n");
- store_check_cachable_hist.no.negative_cached++;
+++ /dev/null
-Index: squid/src/unlinkd.c
-diff -c squid/src/unlinkd.c:1.44.2.1 squid/src/unlinkd.c:1.44.2.2
-*** squid/src/unlinkd.c:1.44.2.1 Sat Jul 20 18:30:03 2002
---- squid/src/unlinkd.c Mon Jul 21 16:34:50 2003
-***************
-*** 139,144 ****
---- 139,145 ----
- return;
- }
- statCounter.unlink.requests++;
-+ statCounter.syscalls.disk.unlinks++;
- queuelen++;
- }
-
-Index: squid/src/fs/aufs/store_io_aufs.c
-diff -c squid/src/fs/aufs/store_io_aufs.c:1.15.2.10 squid/src/fs/aufs/store_io_aufs.c:1.15.2.11
-*** squid/src/fs/aufs/store_io_aufs.c:1.15.2.10 Wed Jun 18 17:13:40 2003
---- squid/src/fs/aufs/store_io_aufs.c Mon Jul 21 16:34:53 2003
-***************
-*** 66,71 ****
---- 66,72 ----
- sio->e = e;
- cbdataLock(callback_data);
- Opening_FD++;
-+ statCounter.syscalls.disk.opens++;
- #if ASYNC_OPEN
- aioOpen(path, O_RDONLY | O_BINARY, 0644, storeAufsOpenDone, sio);
- #else
-***************
-*** 120,125 ****
---- 121,127 ----
- sio->e = (StoreEntry *) e;
- cbdataLock(callback_data);
- Opening_FD++;
-+ statCounter.syscalls.disk.opens++;
- #if ASYNC_CREATE
- aioOpen(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0644, storeAufsOpenDone, sio);
- #else
-***************
-*** 182,189 ****
---- 184,193 ----
- aiostate->flags.reading = 1;
- #if ASYNC_READ
- aioRead(aiostate->fd, offset, size, storeAufsReadDone, sio);
-+ statCounter.syscalls.disk.reads++;
- #else
- file_read(aiostate->fd, buf, size, offset, storeAufsReadDone, sio);
-+ /* file_read() increments syscalls.disk.reads */
- #endif
- }
-
-***************
-*** 222,230 ****
---- 226,236 ----
- aiostate->flags.writing = 1;
- aioWrite(aiostate->fd, offset, buf, size, storeAufsWriteDone, sio,
- free_func);
-+ statCounter.syscalls.disk.writes++;
- #else
- file_write(aiostate->fd, offset, buf, size, storeAufsWriteDone, sio,
- free_func);
-+ /* file_write() increments syscalls.disk.writes */
- #endif
- }
-
-***************
-*** 236,241 ****
---- 242,248 ----
- storeAufsDirReplRemove(e);
- storeAufsDirMapBitReset(SD, e->swap_filen);
- storeAufsDirUnlinkFile(SD, e->swap_filen);
-+ statCounter.syscalls.disk.unlinks++;
- }
-
- /* === STATIC =========================================================== */
-***************
-*** 428,433 ****
---- 435,441 ----
- aioClose(fd);
- fd_close(fd);
- store_open_disk_fd--;
-+ statCounter.syscalls.disk.closes++;
- debug(79, 9) ("%s:%d\n", __FILE__, __LINE__);
- }
-
+++ /dev/null
-Index: squid/src/client_side.c
-diff -c squid/src/client_side.c:1.561.2.36 squid/src/client_side.c:1.561.2.37
-*** squid/src/client_side.c:1.561.2.36 Sat May 24 05:08:41 2003
---- squid/src/client_side.c Wed Jul 9 15:56:43 2003
-***************
-*** 1912,1917 ****
---- 1912,1918 ----
- memFree(buf, MEM_CLIENT_SOCK_BUF);
- return;
- } else if (http->request->flags.reset_tcp) {
-+ memFree(buf, MEM_CLIENT_SOCK_BUF);
- comm_reset_close(fd);
- return;
- } else if (entry && EBIT_TEST(entry->flags, ENTRY_ABORTED)) {