diff -Ncr squid-199807232310/ChangeLog squid-199807260104/ChangeLog *** squid-199807232310/ChangeLog Thu Jul 23 22:06:18 1998 --- squid-199807260104/ChangeLog Sun Jul 26 00:02:29 1998 *************** *** 6,11 **** --- 6,22 ---- Nordstrom). - Fixed peerDigestFetchFinish() assertion caused by forwarding failures (e.g. miss_access rules). + - Changed signal handlers with ASYNC_IO and Linux so that + -k command line options work (Miquel van Smoorenburg). + - Rewrote shutdown code to use events instead of setting + FD timeouts. + - Fixed cachemgr 'objects' (statObjects()) by adding a check + for READ_AHEAD_GAP, and calling storeCheckSwapout() in + storeBufferFlush(). Otherwise, the read-past pages would + never be freed. + - Modified storeHashInsert() to insert PRIVATE objects at + the tail of the LRU list, and PUBLIC objects at the head. + Thus, PRIVATE objects get kicked out quicker. Changes to squid-1.2.beta23 (June 22, 1998): diff -Ncr squid-199807232310/TODO squid-199807260104/TODO *** squid-199807232310/TODO Wed Jul 15 17:18:53 1998 --- squid-199807260104/TODO Fri Jul 24 15:04:05 1998 *************** *** 32,37 **** --- 32,39 ---- (3) LDAP support. See http://miso.wwa.com/~donley/ and Clayton Donley (3) What to do about ACL's and URL escaping? + (3) Arjan's external proxy auth patch is at + http://www.iae.nl/users/devet/squid/proxy_auth/ (4) ** Everywhere that we use 'pattern' or such, use ACL elements instead. stoplist_pattern, refresh_pattern, ... (DW) diff -Ncr squid-199807232310/errors/Turkish/ERR_ACCESS_DENIED squid-199807260104/errors/Turkish/ERR_ACCESS_DENIED *** squid-199807232310/errors/Turkish/ERR_ACCESS_DENIED Tue Jul 14 16:14:41 1998 --- squid-199807260104/errors/Turkish/ERR_ACCESS_DENIED Fri Jul 24 09:29:52 1998 *************** *** 8,19 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

DNS sunucusundan gelen cevap:

%z
-

!

!  Cache sunucusu verdiğiniz hedef WWW sunucusunun IP adresini bulamadı.
!  Adresin doğru olup olmadığını lütfen tekrar kontrol ediniz.
! 

- --- 8,25 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! %H isimli sunucuya ayit herhangi bir IP adresi bulunamadı.

DNS sunucusundan gelen cevap:

%z

! Cache Sunucusu, verdiğiniz hedef WWW sunucusunun IP adresini bulamadı. ! Adresin doğru olup olmadığını tekrar kontrol ediniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_FORWARDING_DENIED squid-199807260104/errors/Turkish/ERR_FORWARDING_DENIED *** squid-199807232310/errors/Turkish/ERR_FORWARDING_DENIED Tue Jul 14 16:14:45 1998 --- squid-199807260104/errors/Turkish/ERR_FORWARDING_DENIED Fri Jul 24 09:29:55 1998 *************** *** 8,14 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

! Bu Cache Sunucu, yapılan ayarlardan ve tanımlanan kullanıcı hakklarından dolayı ! isteğinizi yönlendirememektedir. %i isimli Cache Sunucu ayarlarında bir yanlışlık olabilir.

diff -Ncr squid-199807232310/errors/Turkish/ERR_FTP_DISABLED squid-199807260104/errors/Turkish/ERR_FTP_DISABLED *** squid-199807232310/errors/Turkish/ERR_FTP_DISABLED Tue Jul 14 16:14:46 1998 --- squid-199807260104/errors/Turkish/ERR_FTP_DISABLED Fri Jul 24 09:29:56 1998 *************** *** 8,14 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

! Bu cache sunucu FTP desteklemiyor.

diff -Ncr squid-199807232310/errors/Turkish/ERR_FTP_FAILURE squid-199807260104/errors/Turkish/ERR_FTP_FAILURE *** squid-199807232310/errors/Turkish/ERR_FTP_FAILURE Tue Jul 14 16:14:46 1998 --- squid-199807260104/errors/Turkish/ERR_FTP_FAILURE Fri Jul 24 09:29:56 1998 *************** *** 3,23 ****

HATA

!

İstenilen URL'e ulaşılamadı


%U

! adresine ulaşırken aşağıdaki FTP hatası oluştu

! Squid şu FTP komutlarını gönderdi:

%f
! ve şu cevabı aldı
%F
%g

! Bunun nedeni, verdiğiniz URL adresinin RFC 1738'e uyumlu olmaması olabilir. Bu durumda istediğiniz dokümanı %B adresinde bulabilirsiniz.

- --- 3,22 ----

HATA

!

İstenilen URL'e ulaşılamadı.


%U

! adresine ulaşmaya çalışırken FTP hatası oluştu.

! Squid, şu FTP komutlarını gönderdi:

%f
! ve şu cevabı aldı:
%F
%g

! Bunun nedeni, verdiğiniz FTP URL adresinin RFC 1738'e uyumlu olmaması olabilir. Bu durumda istediğiniz dokümanı %B adresinde bulabilirsiniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_FTP_PUT_CREATED squid-199807260104/errors/Turkish/ERR_FTP_PUT_CREATED *** squid-199807232310/errors/Turkish/ERR_FTP_PUT_CREATED Tue Jul 14 16:14:47 1998 --- squid-199807260104/errors/Turkish/ERR_FTP_PUT_CREATED Fri Jul 24 09:29:57 1998 *************** *** 3,10 **** FTP PUT Başarılı: Dosya Yaratıldı

İşlem başarıyla tamamlandı.

!

Dosya güncelleşti.


-

-

- --- 3,7 ---- FTP PUT Başarılı: Dosya Yaratıldı

İşlem başarıyla tamamlandı.

!

Dosya güncellendi.


diff -Ncr squid-199807232310/errors/Turkish/ERR_FTP_PUT_ERROR squid-199807260104/errors/Turkish/ERR_FTP_PUT_ERROR *** squid-199807232310/errors/Turkish/ERR_FTP_PUT_ERROR Tue Jul 14 16:14:48 1998 --- squid-199807260104/errors/Turkish/ERR_FTP_PUT_ERROR Fri Jul 24 09:29:57 1998 *************** *** 10,26 ****

adresine FTP ile dosya yüklemesi sırasında

! Squid aşağıdaki FTP komutları gönderdi:


          %f
  
! ve bu mesajı aldı

          %F
  

!

! Lütfen dizin ismini, boş alanı ve yetkilerinizi kontrol edin ve tekrar deneyin.
! 

- --- 10,23 ----

adresine FTP ile dosya yüklemesi sırasında

! Squid, aşağıdaki FTP komutlarını gönderdi:


          %f
  
! ve bu cevabı aldı:

          %F
  

! Lütfen dizin ismini, yetkilerinizi ve boş disk alanını kontrol ederek tekrar deneyiniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_FTP_PUT_MODIFIED squid-199807260104/errors/Turkish/ERR_FTP_PUT_MODIFIED *** squid-199807232310/errors/Turkish/ERR_FTP_PUT_MODIFIED Tue Jul 14 16:14:48 1998 --- squid-199807260104/errors/Turkish/ERR_FTP_PUT_MODIFIED Fri Jul 24 09:29:58 1998 *************** *** 1,10 **** ! FTP PUT Başarılı: Dosya Güncelleşti

İşlem başarıyla tamamlandı.

!

Dosya Güncelleşti.


-

-

- --- 1,7 ---- ! FTP PUT Başarılı: Dosya güncellendi

İşlem başarıyla tamamlandı.

!

Dosya güncellendi.


diff -Ncr squid-199807232310/errors/Turkish/ERR_INVALID_REQ squid-199807260104/errors/Turkish/ERR_INVALID_REQ *** squid-199807232310/errors/Turkish/ERR_INVALID_REQ Tue Jul 14 16:14:49 1998 --- squid-199807260104/errors/Turkish/ERR_INVALID_REQ Fri Jul 24 09:29:58 1998 *************** *** 8,14 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

! Vermiş olduğunuz HTTP isteği yanlış. Buna sebep aşağidakilerden herhangi biri olabilir:

diff -Ncr squid-199807232310/errors/Turkish/ERR_INVALID_URL squid-199807260104/errors/Turkish/ERR_INVALID_URL *** squid-199807232310/errors/Turkish/ERR_INVALID_URL Tue Jul 14 16:14:49 1998 --- squid-199807260104/errors/Turkish/ERR_INVALID_URL Fri Jul 24 09:29:59 1998 *************** *** 8,27 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

! Vermiş olduğunuz URL yanlış. Bunun nedenleri bunlar olabilir:

--- 8,26 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! Vermiş olduğunuz URL yanlış. Buna sebep aşağidakilerden herhangi biri olabilir:

diff -Ncr squid-199807232310/errors/Turkish/ERR_LIFETIME_EXP squid-199807260104/errors/Turkish/ERR_LIFETIME_EXP *** squid-199807232310/errors/Turkish/ERR_LIFETIME_EXP Tue Jul 14 16:14:50 1998 --- squid-199807260104/errors/Turkish/ERR_LIFETIME_EXP Fri Jul 24 09:30:00 1998 *************** *** 8,23 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

! Squid bağlantı süresi dolduğu için isteğinizi durdurdu.

--- 8,21 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! Squid, bağlantı süresi dolduğu için isteğinizi durdurdu.

diff -Ncr squid-199807232310/errors/Turkish/ERR_NO_RELAY squid-199807260104/errors/Turkish/ERR_NO_RELAY *** squid-199807232310/errors/Turkish/ERR_NO_RELAY Tue Jul 14 16:14:50 1998 --- squid-199807260104/errors/Turkish/ERR_NO_RELAY Fri Jul 24 09:30:00 1998 *************** *** 8,22 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

! Bu cache sunucuda WAIS sunucu tanımlı değil. Lütfen cache yöneticisi ile bağlantıya geçiniz.

--- 8,21 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! Bu Cache Sunucuda WAIS sunucu tanımlı değil. Lütfen Cache Yöneticisi ile bağlantıya geçiniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_ONLY_IF_CACHED_MISS squid-199807260104/errors/Turkish/ERR_ONLY_IF_CACHED_MISS *** squid-199807232310/errors/Turkish/ERR_ONLY_IF_CACHED_MISS Tue Jul 14 16:14:51 1998 --- squid-199807260104/errors/Turkish/ERR_ONLY_IF_CACHED_MISS Fri Jul 24 09:30:01 1998 *************** *** 8,26 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

- only-if-cached kontrol mekanizmalı istekte bulundunuz. Bu doküman ! cache sunucusunda bulunamadı veya bu kontrolün izin vermediği tazeleme yapılması gerekiyor. !

--- 8,23 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

only-if-cached kontrol mekanizmalı istekte bulundunuz. Bu doküman ! cache sunucusunda bulunamadı veya bu mekanizmanın izin vermediği tazeleme yapılması gerekiyor.

diff -Ncr squid-199807232310/errors/Turkish/ERR_READ_ERROR squid-199807260104/errors/Turkish/ERR_READ_ERROR *** squid-199807232310/errors/Turkish/ERR_READ_ERROR Tue Jul 14 16:14:52 1998 --- squid-199807260104/errors/Turkish/ERR_READ_ERROR Fri Jul 24 09:30:01 1998 *************** *** 8,27 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

Sistem aşağıdaki mesajı verdi:

    %E
-

! Ağıdan bilgileri okuma sırasında hata oluştu. Lütfen isteğinizi tekrar giriniz.

--- 8,24 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

Sistem aşağıdaki mesajı verdi:

    %E

! Ağdan bilgileri okuma sırasında hata oluştu. Lütfen isteğinizi tekrar giriniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_READ_TIMEOUT squid-199807260104/errors/Turkish/ERR_READ_TIMEOUT *** squid-199807232310/errors/Turkish/ERR_READ_TIMEOUT Tue Jul 14 16:14:52 1998 --- squid-199807260104/errors/Turkish/ERR_READ_TIMEOUT Fri Jul 24 09:30:02 1998 *************** *** 8,27 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

Sistem aşağıdaki mesajı verdi:

    %E
-

! İstemiş olduğunuz bilgileri ağıdan okuma sırasında okuma zamanı doldu. Hedef sunucu ! kapalı veya çok meşkul olabilir. Lütfen isteğinizi tekrar girinizi

--- 8,25 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

Sistem aşağıdaki mesajı verdi:

    %E

! İstemiş olduğunuz bilgileri ağdan okuma sırasında okuma zamanı doldu. Hedef sunucu ! kapalı veya çok meşgul olabilir. Lütfen isteğinizi tekrar giriniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_SOCKET_FAILURE squid-199807260104/errors/Turkish/ERR_SOCKET_FAILURE *** squid-199807232310/errors/Turkish/ERR_SOCKET_FAILURE Tue Jul 14 16:14:53 1998 --- squid-199807260104/errors/Turkish/ERR_SOCKET_FAILURE Fri Jul 24 09:30:02 1998 *************** *** 8,27 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

Sistem aşağıdaki mesajı verdi:

    %E
-

! Squid TCP soket yaratamadı. Bunun nedeni sunucunun çok fazla yüklendiği olabilir. ! Lütfen isteğinizi tekrar girinizi.

--- 8,25 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

Sistem aşağıdaki mesajı verdi:

    %E

! Squid, TCP bağlantı yaratamadı. Bunun nedeni hedef sunucunun çok fazla yüklenmiş olması olabilir. ! Lütfen isteğinizi tekrar giriniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_UNSUP_REQ squid-199807260104/errors/Turkish/ERR_UNSUP_REQ *** squid-199807232310/errors/Turkish/ERR_UNSUP_REQ Tue Jul 14 16:14:53 1998 --- squid-199807260104/errors/Turkish/ERR_UNSUP_REQ Fri Jul 24 09:30:03 1998 *************** *** 8,24 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

! Squid tüm istek metodları mevcut tüm protokler için desteklemiyor. ! Örneğin Gopher isteğinizde POST yapamazsınız.

- --- 8,21 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! Squid, bazı erişim protokollerin, bazı istek yöntemlerini desteklemiyor. Örneğin Gopher isteğinizde POST yapamazsınız.

diff -Ncr squid-199807232310/errors/Turkish/ERR_URN_RESOLVE squid-199807260104/errors/Turkish/ERR_URN_RESOLVE *** squid-199807232310/errors/Turkish/ERR_URN_RESOLVE Tue Jul 14 16:14:54 1998 --- squid-199807260104/errors/Turkish/ERR_URN_RESOLVE Fri Jul 24 09:30:03 1998 *************** *** 8,23 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

%T de URN den fazla birsey beklemeyin. :)

--- 8,21 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

%T de URN den fazla birsey beklemeyin. :)

diff -Ncr squid-199807232310/errors/Turkish/ERR_WRITE_ERROR squid-199807260104/errors/Turkish/ERR_WRITE_ERROR *** squid-199807232310/errors/Turkish/ERR_WRITE_ERROR Tue Jul 14 16:14:55 1998 --- squid-199807260104/errors/Turkish/ERR_WRITE_ERROR Fri Jul 24 09:30:04 1998 *************** *** 8,27 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

! Sistem aşağıdaki mesajı verdi:

    %E
-

! Bilgiler ağı üzerine gönderilirken hata oluştu. Lütfen isteğinizi tekrar giriniz.

--- 8,24 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! Sistem, aşağıdaki mesajı verdi:

    %E

! Bilgiler ağ üzerine gönderilirken hata oluştu. Lütfen isteğinizi tekrar giriniz.

diff -Ncr squid-199807232310/errors/Turkish/ERR_ZERO_SIZE_OBJECT squid-199807260104/errors/Turkish/ERR_ZERO_SIZE_OBJECT *** squid-199807232310/errors/Turkish/ERR_ZERO_SIZE_OBJECT Tue Jul 14 16:14:55 1998 --- squid-199807260104/errors/Turkish/ERR_ZERO_SIZE_OBJECT Fri Jul 24 09:30:04 1998 *************** *** 8,23 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

-

! Squid isteğiniz ile ilgili hiç bir bilgi alamadı.

--- 8,21 ----

%U

! adresine ulaşırken aşağıdaki hata oluştu:

! Squid, isteğiniz ile ilgili herhangi bir bilgi alamadı.

diff -Ncr squid-199807232310/errors/Turkish/generic squid-199807260104/errors/Turkish/generic *** squid-199807232310/errors/Turkish/generic Tue Jul 14 16:14:56 1998 --- squid-199807260104/errors/Turkish/generic Fri Jul 24 09:30:05 1998 *************** *** 8,14 ****

%U

! adresine ulaşırken aşağıdaki hata oluştu

! Sistem, aşağıdaki mesajı verdi:

    %E

Bunun anlamı:

      @LONG_DESCRIPTION@
  

diff -Ncr squid-199807232310/include/version.h squid-199807260104/include/version.h *** squid-199807232310/include/version.h Thu Jul 23 22:12:09 1998 --- squid-199807260104/include/version.h Sun Jul 26 00:06:20 1998 *************** *** 8,12 **** #endif #ifndef SQUID_RELEASE_TIME ! #define SQUID_RELEASE_TIME 901257129 #endif --- 8,12 ---- #endif #ifndef SQUID_RELEASE_TIME ! #define SQUID_RELEASE_TIME 901436780 #endif diff -Ncr squid-199807232310/src/Makefile.in squid-199807260104/src/Makefile.in *** squid-199807232310/src/Makefile.in Tue Jul 21 10:03:48 1998 --- squid-199807260104/src/Makefile.in Fri Jul 24 20:53:32 1998 *************** *** 1,7 **** # # Makefile for the Squid Object Cache server # ! # $Id: Makefile.in,v 1.155 1998/07/21 17:03:48 wessels Exp $ # # Uncomment and customize the following to suit your needs: # --- 1,7 ---- # # Makefile for the Squid Object Cache server # ! # $Id: Makefile.in,v 1.156 1998/07/25 03:53:32 wessels Exp $ # # Uncomment and customize the following to suit your needs: # *************** *** 84,89 **** --- 84,90 ---- @ASYNC_OBJS@ \ cache_cf.o \ CacheDigest.o \ + cache_manager.o \ carp.o \ cbdata.o \ client_db.o \ *************** *** 132,138 **** multicast.o \ neighbors.o \ net_db.o \ - cache_manager.o \ Packer.o \ pconn.o \ peer_digest.o \ --- 133,138 ---- diff -Ncr squid-199807232310/src/access_log.c squid-199807260104/src/access_log.c *** squid-199807232310/src/access_log.c Wed Jul 22 13:36:56 1998 --- squid-199807260104/src/access_log.c Fri Jul 24 07:40:51 1998 *************** *** 1,7 **** /* ! * $Id: access_log.c,v 1.39 1998/07/22 20:36:56 wessels Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels --- 1,7 ---- /* ! * $Id: access_log.c,v 1.40 1998/07/24 14:40:51 wessels Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels *************** *** 178,184 **** al->private.method_str, al->url, al->cache.ident, ! al->hier.icp.timeout ? "TIMEOUT_" : "", hier_strings[al->hier.code], al->hier.host, al->http.content_type); --- 178,184 ---- al->private.method_str, al->url, al->cache.ident, ! al->hier.icp.timedout ? "TIMEOUT_" : "", hier_strings[al->hier.code], al->hier.host, al->http.content_type); diff -Ncr squid-199807232310/src/aiops.c squid-199807260104/src/aiops.c *** squid-199807232310/src/aiops.c Wed Jul 22 13:36:58 1998 --- squid-199807260104/src/aiops.c Fri Jul 24 09:14:14 1998 *************** *** 1,5 **** /* ! * $Id: aiops.c,v 1.19 1998/07/22 20:36:58 wessels Exp $ * * DEBUG: section 43 AIOPS * AUTHOR: Stewart Forster --- 1,5 ---- /* ! * $Id: aiops.c,v 1.20 1998/07/24 16:14:14 wessels Exp $ * * DEBUG: section 43 AIOPS * AUTHOR: Stewart Forster *************** *** 206,213 **** --- 206,218 ---- sigemptyset(&new); sigaddset(&new, SIGPIPE); sigaddset(&new, SIGCHLD); + #if (defined(_SQUID_LINUX_) && USE_ASYNC_IO) + sigaddset(&new, SIGQUIT); + sigaddset(&new, SIGTRAP); + #else sigaddset(&new, SIGUSR1); sigaddset(&new, SIGUSR2); + #endif sigaddset(&new, SIGHUP); sigaddset(&new, SIGTERM); sigaddset(&new, SIGINT); diff -Ncr squid-199807232310/src/client_side.c squid-199807260104/src/client_side.c *** squid-199807232310/src/client_side.c Thu Jul 23 16:50:51 1998 --- squid-199807260104/src/client_side.c Fri Jul 24 10:02:56 1998 *************** *** 1,6 **** /* ! * $Id: client_side.c,v 1.365 1998/07/23 23:50:51 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels --- 1,6 ---- /* ! * $Id: client_side.c,v 1.366 1998/07/24 17:02:56 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels *************** *** 660,696 **** clientInterpretRequestHeaders(clientHttpRequest * http) { request_t *request = http->request; - #if OLD_CODE - char *request_hdr = request->headers; - const char *t = NULL; - #else const HttpHeader *req_hdr = &request->header; #if USE_USERAGENT_LOG const char *str; #endif - #endif - #if OLD_CODE - request->ims = -2; - request->imslen = -1; - if ((t = httpHeaderGetStr(req_hdr, HDR_IF_MODIFIED_SINCE))) { - EBIT_SET(request->flags, REQ_IMS); - request->ims = parse_rfc1123(t); - /* - * "length=..." is not in the HTTP/1.1 specs. Any real proof that we - * should hornor it? Send complains to rousskov@nlanr.net - */ - while ((t = strchr(t, ';'))) { - for (t++; isspace(*t); t++); - if (strncasecmp(t, "length=", 7) == 0) - request->imslen = atoi(t + 7); - } - } - #else request->imslen = -1; request->ims = httpHeaderGetTime(req_hdr, HDR_IF_MODIFIED_SINCE); if (request->ims > 0) EBIT_SET(request->flags, REQ_IMS); - #endif if (httpHeaderHas(req_hdr, HDR_PRAGMA)) { String s = httpHeaderGetList(req_hdr, HDR_PRAGMA); if (strListIsMember(&s, "no-cache", ',')) { --- 660,673 ---- *************** *** 701,733 **** } stringClean(&s); } - #if OLD_CODE - if (httpHeaderHas(req_hdr, HDR_RANGE)) { - EBIT_SET(request->flags, REQ_NOCACHE); - EBIT_SET(request->flags, REQ_RANGE); - /* Request-Range: deleted, not in the specs. Does it exist? */ - } - #else /* ignore range header in non-GETs */ if (request->method == METHOD_GET) { request->range = httpHeaderGetRange(req_hdr); if (request->range) EBIT_SET(request->flags, REQ_RANGE); } - #endif if (httpHeaderHas(req_hdr, HDR_AUTHORIZATION)) EBIT_SET(request->flags, REQ_AUTH); if (request->login[0] != '\0') EBIT_SET(request->flags, REQ_AUTH); - #if OLD_CODE - if ((t = httpHeaderGetStr(req_hdr, HDR_PROXY_CONNECTION))) { - if (!strcasecmp(t, "Keep-Alive")) - EBIT_SET(request->flags, REQ_PROXY_KEEPALIVE); - } - #else if (httpMsgIsPersistent(request->http_ver, req_hdr)) EBIT_SET(request->flags, REQ_PROXY_KEEPALIVE); - #endif if (httpHeaderHas(req_hdr, HDR_VIA)) { String s = httpHeaderGetList(req_hdr, HDR_VIA); /* ThisCache cannot be a member of Via header, "1.0 ThisCache" can */ --- 678,695 ---- *************** *** 753,777 **** stringClean(&s); } #endif - #if OLD_CODE - if ((t = mime_get_header_field(request_hdr, "Cache-control", "max-age="))) { - request->max_age = atoi(t + 8); - } else { - request->max_age = -1; - } - if ((t = mime_get_header_field(request_hdr, "Cache-control", "only-if-cached"))) { - EBIT_SET(request->flags, REQ_CC_ONLY_IF_CACHED); - } - #else request->cache_control = httpHeaderGetCc(req_hdr); - #endif if (request->method == METHOD_TRACE) { - #if OLD_CODE - if ((t = mime_get_header(request_hdr, "Max-Forwards"))) - request->max_forwards = atoi(t); - #else request->max_forwards = httpHeaderGetInt(req_hdr, HDR_MAX_FORWARDS); - #endif } if (clientCachable(http)) EBIT_SET(request->flags, REQ_CACHABLE); --- 715,723 ---- diff -Ncr squid-199807232310/src/comm.c squid-199807260104/src/comm.c *** squid-199807232310/src/comm.c Wed Jul 22 13:37:11 1998 --- squid-199807260104/src/comm.c Fri Jul 24 17:18:08 1998 *************** *** 1,7 **** /* ! * $Id: comm.c,v 1.278 1998/07/22 20:37:11 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived --- 1,7 ---- /* ! * $Id: comm.c,v 1.280 1998/07/25 00:18:08 wessels Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived *************** *** 385,395 **** F->timeout_data = NULL; return F->timeout = 0; } - if (shutting_down) { - /* don't increase the timeout if something pending */ - if (F->timeout > 0 && (int) (F->timeout - squid_curtime) < timeout) - return F->timeout; - } assert(handler || F->timeout_handler); if (handler || data) { F->timeout_handler = handler; --- 385,390 ---- *************** *** 868,871 **** --- 863,891 ---- return 0; } /* NOTREACHED */ + } + + void + commCloseAllSockets(void) + { + int fd; + fde *F = NULL; + PF *callback; + for (fd = 0; fd <= Biggest_FD; fd++) { + F = &fd_table[fd]; + if (F->open != FD_OPEN) + continue; + if (F->type != FD_SOCKET) + continue; + if (F->timeout_handler) { + debug(5, 5) ("commCloseAllSockets: FD %d: Calling timeout handler\n", + fd); + callback = F->timeout_handler; + F->timeout_handler = NULL; + callback(fd, F->timeout_data); + } else { + debug(5, 5) ("commCloseAllSockets: FD %d: calling comm_close()\n", fd); + comm_close(fd); + } + } } diff -Ncr squid-199807232310/src/comm_select.c squid-199807260104/src/comm_select.c *** squid-199807232310/src/comm_select.c Wed Jul 22 13:37:11 1998 --- squid-199807260104/src/comm_select.c Fri Jul 24 17:16:25 1998 *************** *** 1,7 **** /* ! * $Id: comm_select.c,v 1.2 1998/07/22 20:37:11 wessels Exp $ * * DEBUG: section 5 Socket Functions * --- 1,7 ---- /* ! * $Id: comm_select.c,v 1.3 1998/07/25 00:16:25 wessels Exp $ * * DEBUG: section 5 Socket Functions * *************** *** 269,286 **** #if !ALARM_UPDATES_TIME getCurrentTime(); #endif - if (shutting_down) { - serverConnectionsClose(); - dnsShutdownServers(); - redirectShutdownServers(); - /* shutting_down will be set to - * +1 for SIGTERM - * -1 for SIGINT */ - if (shutting_down > 0) - setSocketShutdownLifetimes(Config.shutdownLifetime); - else - setSocketShutdownLifetimes(1); - } #if USE_ASYNC_IO aioCheckCallbacks(); #endif --- 269,274 ---- *************** *** 306,315 **** nfds++; } } ! if (shutting_down) ! debug(5, 2) ("comm_poll: Still waiting on %d FDs\n", nfds); ! if (nfds == 0) return COMM_SHUTDOWN; if (msec > MAX_POLL_TIME) msec = MAX_POLL_TIME; for (;;) { --- 294,303 ---- nfds++; } } ! if (nfds == 0) { ! assert(shutting_down); return COMM_SHUTDOWN; + } if (msec > MAX_POLL_TIME) msec = MAX_POLL_TIME; for (;;) { *************** *** 537,554 **** #endif FD_ZERO(&readfds); FD_ZERO(&writefds); - if (shutting_down) { - serverConnectionsClose(); - dnsShutdownServers(); - redirectShutdownServers(); - /* shutting_down will be set to - * +1 for SIGTERM - * -1 for SIGINT */ - if (shutting_down > 0) - setSocketShutdownLifetimes(Config.shutdownLifetime); - else - setSocketShutdownLifetimes(1); - } if (commCheckICPIncoming) comm_select_icp_incoming(); if (commCheckHTTPIncoming) --- 525,530 ---- *************** *** 567,576 **** FD_SET(i, &writefds); } } ! if (shutting_down) ! debug(5, 2) ("comm_select: Still waiting on %d FDs\n", nfds); ! if (nfds == 0) return COMM_SHUTDOWN; if (msec > MAX_POLL_TIME) msec = MAX_POLL_TIME; for (;;) { --- 543,552 ---- FD_SET(i, &writefds); } } ! if (nfds == 0) { ! assert(shutting_down); return COMM_SHUTDOWN; + } if (msec > MAX_POLL_TIME) msec = MAX_POLL_TIME; for (;;) { diff -Ncr squid-199807232310/src/dns.c squid-199807260104/src/dns.c *** squid-199807232310/src/dns.c Wed Jul 22 13:37:14 1998 --- squid-199807260104/src/dns.c Fri Jul 24 17:16:26 1998 *************** *** 1,6 **** /* ! * $Id: dns.c,v 1.61 1998/07/22 20:37:14 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived --- 1,6 ---- /* ! * $Id: dns.c,v 1.62 1998/07/25 00:16:26 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived *************** *** 189,198 **** } void ! dnsShutdownServers(void) { dnsserver_t *dns = NULL; int k; debug(34, 3) ("dnsShutdownServers:\n"); for (k = 0; k < NDnsServersAlloc; k++) { dns = *(dns_child_table + k); --- 189,199 ---- } void ! dnsShutdownServers(void *notused) { dnsserver_t *dns = NULL; int k; + int na = 0; debug(34, 3) ("dnsShutdownServers:\n"); for (k = 0; k < NDnsServersAlloc; k++) { dns = *(dns_child_table + k); *************** *** 203,208 **** --- 204,210 ---- if (EBIT_TEST(dns->flags, HELPER_BUSY)) { debug(34, 3) ("dnsShutdownServers: #%d is BUSY.\n", dns->id); EBIT_SET(dns->flags, HELPER_SHUTDOWN); + na++; continue; } if (EBIT_TEST(dns->flags, HELPER_CLOSING)) { *************** *** 211,216 **** --- 213,220 ---- } dnsShutdownServer(dns); } + if (na) + eventAdd("dnsShutdownServers", dnsShutdownServers, NULL, 1.0, 1); } void diff -Ncr squid-199807232310/src/main.c squid-199807260104/src/main.c *** squid-199807232310/src/main.c Wed Jul 22 20:22:29 1998 --- squid-199807260104/src/main.c Sat Jul 25 11:25:44 1998 *************** *** 1,6 **** /* ! * $Id: main.c,v 1.260 1998/07/23 03:22:29 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived --- 1,6 ---- /* ! * $Id: main.c,v 1.263 1998/07/25 18:25:44 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived *************** *** 63,74 **** static void serverConnectionsOpen(void); static void watch_child(char **); static void setEffectiveUser(void); - static void normal_shutdown(void); #if MEM_GEN_TRACE extern void log_trace_done(); extern void log_trace_init(char *); #endif ! static EVH force_shutdown; static void usage(void) --- 63,73 ---- static void serverConnectionsOpen(void); static void watch_child(char **); static void setEffectiveUser(void); #if MEM_GEN_TRACE extern void log_trace_done(); extern void log_trace_init(char *); #endif ! static EVH SquidShutdown; static void usage(void) *************** *** 153,161 **** --- 152,168 ---- if (!strncmp(optarg, "reconfigure", strlen(optarg))) opt_send_signal = SIGHUP; else if (!strncmp(optarg, "rotate", strlen(optarg))) + #if (defined(_SQUID_LINUX_) && USE_ASYNC_IO) + opt_send_signal = SIGQUIT; + #else opt_send_signal = SIGUSR1; + #endif else if (!strncmp(optarg, "debug", strlen(optarg))) + #if (defined(_SQUID_LINUX_) && USE_ASYNC_IO) + opt_send_signal = SIGTRAP; + #else opt_send_signal = SIGUSR2; + #endif else if (!strncmp(optarg, "shutdown", strlen(optarg))) opt_send_signal = SIGTERM; else if (!strncmp(optarg, "interrupt", strlen(optarg))) *************** *** 280,289 **** void serverConnectionsClose(void) { ! /* ! * NOTE, this function will be called repeatedly while shutdown ! * is pending ! */ clientHttpConnectionsClose(); icpConnectionShutdown(); #if USE_HTCP --- 287,293 ---- void serverConnectionsClose(void) { ! assert(shutting_down || reconfiguring); clientHttpConnectionsClose(); icpConnectionShutdown(); #if USE_HTCP *************** *** 310,317 **** #ifdef SQUID_SNMP snmpConnectionClose(); #endif ! dnsShutdownServers(); ! redirectShutdownServers(); storeDirCloseSwapLogs(); errorFree(); parseConfigFile(ConfigFile); --- 314,321 ---- #ifdef SQUID_SNMP snmpConnectionClose(); #endif ! dnsShutdownServers(NULL); ! redirectShutdownServers(NULL); storeDirCloseSwapLogs(); errorFree(); parseConfigFile(ConfigFile); *************** *** 438,444 **** if (!configured_once) writePidFile(); /* write PID file */ ! #if !(defined(_SQUID_LINUX_) && USE_ASYNC_IO) squid_signal(SIGUSR1, rotate_logs, SA_RESTART); squid_signal(SIGUSR2, sigusr2_handle, SA_RESTART); #endif --- 442,451 ---- if (!configured_once) writePidFile(); /* write PID file */ ! #if (defined(_SQUID_LINUX_) && USE_ASYNC_IO) ! squid_signal(SIGQUIT, rotate_logs, SA_RESTART); ! squid_signal(SIGTRAP, sigusr2_handle, SA_RESTART); ! #else squid_signal(SIGUSR1, rotate_logs, SA_RESTART); squid_signal(SIGUSR2, sigusr2_handle, SA_RESTART); #endif *************** *** 554,561 **** wait); do_shutdown = 0; shutting_down = 1; ! eventAdd("force_shutdown", force_shutdown, ! NULL, (double) (wait+1), 1); } eventRun(); if ((loop_delay = eventNextTime()) < 0) --- 561,570 ---- wait); do_shutdown = 0; shutting_down = 1; ! serverConnectionsClose(); ! eventAdd("dnsShutdownServers", dnsShutdownServers, NULL, 0.0, 1); ! eventAdd("redirectShutdownServers", redirectShutdownServers, NULL, 0.0, 1); ! eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1); } eventRun(); if ((loop_delay = eventNextTime()) < 0) *************** *** 574,596 **** if (errcount == 10) fatal_dump("Select Loop failed!"); break; - case COMM_SHUTDOWN: - /* delayed close so we can transmit while shutdown pending */ - icpConnectionClose(); - #if USE_HTCP - htcpSocketClose(); - #endif - #ifdef SQUID_SNMP - snmpConnectionClose(); - #endif - if (shutting_down) { - normal_shutdown(); - } else { - fatal_dump("MAIN: Unexpected SHUTDOWN from comm_select."); - } - break; case COMM_TIMEOUT: break; default: fatal_dump("MAIN: Internal error -- this should never happen."); break; --- 583,593 ---- if (errcount == 10) fatal_dump("Select Loop failed!"); break; case COMM_TIMEOUT: break; + case COMM_SHUTDOWN: + SquidShutdown(NULL); + break; default: fatal_dump("MAIN: Internal error -- this should never happen."); break; *************** *** 677,683 **** } static void ! normal_shutdown(void) { debug(1, 1) ("Shutting down...\n"); if (Config.pidFilename && strcmp(Config.pidFilename, "none")) { --- 674,680 ---- } static void ! SquidShutdown(void *unused) { debug(1, 1) ("Shutting down...\n"); if (Config.pidFilename && strcmp(Config.pidFilename, "none")) { *************** *** 685,691 **** --- 682,696 ---- safeunlink(Config.pidFilename, 0); leave_suid(); } + icpConnectionClose(); + #if USE_HTCP + htcpSocketClose(); + #endif + #ifdef SQUID_SNMP + snmpConnectionClose(); + #endif releaseServerSockets(); + commCloseAllSockets(); unlinkdClose(); storeDirWriteCleanLogs(0); PrintRusage(); *************** *** 720,735 **** #if MEM_GEN_TRACE log_trace_done(); #endif - debug(1, 0) ("Squid Cache (Version %s): Exiting normally.\n", version_string); fclose(debug_log); exit(0); - } - - static void - force_shutdown(void *unused) - { - fdDumpOpen(); - fatal_dump("Shutdown procedure failed"); } --- 725,732 ---- diff -Ncr squid-199807232310/src/pconn.c squid-199807260104/src/pconn.c *** squid-199807232310/src/pconn.c Wed Jul 22 13:37:39 1998 --- squid-199807260104/src/pconn.c Fri Jul 24 16:53:44 1998 *************** *** 1,6 **** /* ! * $Id: pconn.c,v 1.19 1998/07/22 20:37:39 wessels Exp $ * * DEBUG: section 48 Persistent Connections * AUTHOR: Duane Wessels --- 1,6 ---- /* ! * $Id: pconn.c,v 1.21 1998/07/24 23:53:44 wessels Exp $ * * DEBUG: section 48 Persistent Connections * AUTHOR: Duane Wessels *************** *** 179,184 **** --- 179,187 ---- LOCAL_ARRAY(char, desc, FD_DESC_SZ); if (fdNFree() < (RESERVED_FD << 2)) { debug(48, 3) ("pconnPush: Not many unused FDs\n"); + comm_close(fd); + return; + } else if (shutting_down) { comm_close(fd); return; } diff -Ncr squid-199807232310/src/protos.h squid-199807260104/src/protos.h *** squid-199807232310/src/protos.h Thu Jul 23 12:57:52 1998 --- squid-199807260104/src/protos.h Fri Jul 24 21:47:29 1998 *************** *** 1,6 **** /* ! * $Id: protos.h,v 1.241 1998/07/23 19:57:52 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ --- 1,6 ---- /* ! * $Id: protos.h,v 1.243 1998/07/25 04:47:29 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ *************** *** 151,156 **** --- 151,157 ---- extern int commSetTimeout(int fd, int, PF *, void *); extern void commSetDefer(int fd, DEFER * func, void *); extern int ignoreErrno(int); + extern void commCloseAllSockets(void); /* * comm_select.c *************** *** 195,201 **** extern void disk_init(void); extern int diskWriteIsComplete(int); ! extern void dnsShutdownServers(void); extern void dnsShutdownServer(dnsserver_t * dns); extern void dnsOpenServers(void); extern dnsserver_t *dnsGetFirstAvailable(void); --- 196,202 ---- extern void disk_init(void); extern int diskWriteIsComplete(int); ! extern void dnsShutdownServers(void *); extern void dnsShutdownServer(dnsserver_t * dns); extern void dnsOpenServers(void); extern dnsserver_t *dnsGetFirstAvailable(void); *************** *** 508,514 **** extern const ipcache_addrs *ipcache_gethostbyname(const char *, int flags); extern void ipcacheInvalidate(const char *); extern void ipcacheReleaseInvalid(const char *); - extern void ipcacheShutdownServers(void); extern void ipcache_init(void); extern void stat_ipcache_get(StoreEntry *); extern int ipcacheQueueDrain(void); --- 509,514 ---- *************** *** 637,643 **** extern void redirectStart(clientHttpRequest *, RH *, void *); extern void redirectOpenServers(void); ! extern void redirectShutdownServers(void); extern void redirectStats(StoreEntry *); extern int redirectUnregister(const char *url, void *); extern void redirectFreeMemory(void); --- 637,643 ---- extern void redirectStart(clientHttpRequest *, RH *, void *); extern void redirectOpenServers(void); ! extern void redirectShutdownServers(void *); extern void redirectStats(StoreEntry *); extern int redirectUnregister(const char *url, void *); extern void redirectFreeMemory(void); *************** *** 983,988 **** --- 983,989 ---- extern void asnInit(void); extern void asnFreeMemory(void); extern void dlinkAdd(void *data, dlink_node *, dlink_list *); + extern void dlinkAddTail(void *data, dlink_node *, dlink_list *); extern void dlinkDelete(dlink_node * m, dlink_list * list); extern void kb_incr(kb_t *, size_t); extern double gb_to_double(const gb_t *); diff -Ncr squid-199807232310/src/redirect.c squid-199807260104/src/redirect.c *** squid-199807232310/src/redirect.c Wed Jul 22 13:37:44 1998 --- squid-199807260104/src/redirect.c Fri Jul 24 17:16:29 1998 *************** *** 1,6 **** /* ! * $Id: redirect.c,v 1.63 1998/07/22 20:37:44 wessels Exp $ * * DEBUG: section 29 Redirector * AUTHOR: Duane Wessels --- 1,6 ---- /* ! * $Id: redirect.c,v 1.64 1998/07/25 00:16:29 wessels Exp $ * * DEBUG: section 29 Redirector * AUTHOR: Duane Wessels *************** *** 370,380 **** } void ! redirectShutdownServers(void) { redirector_t *redirect = NULL; redirectStateData *r = NULL; int k; if (Config.Program.redirect == NULL) return; if (redirectQueueHead) { --- 370,381 ---- } void ! redirectShutdownServers(void *unused) { redirector_t *redirect = NULL; redirectStateData *r = NULL; int k; + int na = 0; if (Config.Program.redirect == NULL) return; if (redirectQueueHead) { *************** *** 386,403 **** redirect = *(redirect_child_table + k); if (!EBIT_TEST(redirect->flags, HELPER_ALIVE)) continue; - if (EBIT_TEST(redirect->flags, HELPER_BUSY)) - continue; if (EBIT_TEST(redirect->flags, HELPER_CLOSING)) continue; debug(29, 3) ("redirectShutdownServers: closing redirector #%d, FD %d\n", redirect->index + 1, redirect->fd); comm_close(redirect->fd); EBIT_SET(redirect->flags, HELPER_CLOSING); EBIT_SET(redirect->flags, HELPER_BUSY); } } - int redirectUnregister(const char *url, void *data) --- 387,407 ---- redirect = *(redirect_child_table + k); if (!EBIT_TEST(redirect->flags, HELPER_ALIVE)) continue; if (EBIT_TEST(redirect->flags, HELPER_CLOSING)) continue; + if (EBIT_TEST(redirect->flags, HELPER_BUSY)) { + na++; + continue; + } debug(29, 3) ("redirectShutdownServers: closing redirector #%d, FD %d\n", redirect->index + 1, redirect->fd); comm_close(redirect->fd); EBIT_SET(redirect->flags, HELPER_CLOSING); EBIT_SET(redirect->flags, HELPER_BUSY); } + if (na) + eventAdd("redirectShutdownServers", redirectShutdownServers, NULL, 1.0, 1); } int redirectUnregister(const char *url, void *data) diff -Ncr squid-199807232310/src/stat.c squid-199807260104/src/stat.c *** squid-199807232310/src/stat.c Wed Jul 22 20:29:03 1998 --- squid-199807260104/src/stat.c Fri Jul 24 21:59:11 1998 *************** *** 1,6 **** /* ! * $Id: stat.c,v 1.268 1998/07/23 03:29:03 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived --- 1,6 ---- /* ! * $Id: stat.c,v 1.271 1998/07/25 04:59:11 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived *************** *** 216,235 **** int flags = (int) entry->flag; char *t; buf[0] = '\0'; if (EBIT_TEST(flags, DELAY_SENDING)) ! strcat(buf, "DS,"); if (EBIT_TEST(flags, RELEASE_REQUEST)) ! strcat(buf, "RL,"); if (EBIT_TEST(flags, REFRESH_REQUEST)) ! strcat(buf, "RF,"); if (EBIT_TEST(flags, ENTRY_CACHABLE)) ! strcat(buf, "EC,"); if (EBIT_TEST(flags, ENTRY_DISPATCHED)) ! strcat(buf, "ED,"); if (EBIT_TEST(flags, KEY_PRIVATE)) ! strcat(buf, "KP,"); if (EBIT_TEST(flags, ENTRY_NEGCACHED)) ! strcat(buf, "NG,"); if ((t = strrchr(buf, ','))) *t = '\0'; return buf; --- 216,243 ---- int flags = (int) entry->flag; char *t; buf[0] = '\0'; + if (EBIT_TEST(flags, ENTRY_SPECIAL)) + strcat(buf, "SPECIAL,"); + if (EBIT_TEST(flags, ENTRY_REVALIDATE)) + strcat(buf, "REVALIDATE,"); if (EBIT_TEST(flags, DELAY_SENDING)) ! strcat(buf, "DELAY_SENDING,"); if (EBIT_TEST(flags, RELEASE_REQUEST)) ! strcat(buf, "RELEASE_REQUEST,"); if (EBIT_TEST(flags, REFRESH_REQUEST)) ! strcat(buf, "REFRESH_REQUEST,"); if (EBIT_TEST(flags, ENTRY_CACHABLE)) ! strcat(buf, "CACHABLE,"); if (EBIT_TEST(flags, ENTRY_DISPATCHED)) ! strcat(buf, "DISPATCHED,"); if (EBIT_TEST(flags, KEY_PRIVATE)) ! strcat(buf, "PRIVATE,"); if (EBIT_TEST(flags, ENTRY_NEGCACHED)) ! strcat(buf, "NEGCACHED,"); ! if (EBIT_TEST(flags, ENTRY_VALIDATED)) ! strcat(buf, "VALIDATED,"); ! if (EBIT_TEST(flags, ENTRY_BAD_LENGTH)) ! strcat(buf, "BAD_LENGTH,"); if ((t = strrchr(buf, ','))) *t = '\0'; return buf; *************** *** 299,305 **** StoreEntry *e; hash_link *link_ptr = NULL; hash_link *link_next = NULL; ! if (++state->bucket >= store_hash_buckets) { storeComplete(state->sentry); storeUnlockObject(state->sentry); cbdataFree(state); --- 307,313 ---- StoreEntry *e; hash_link *link_ptr = NULL; hash_link *link_next = NULL; ! if (state->bucket >= store_hash_buckets) { storeComplete(state->sentry); storeUnlockObject(state->sentry); cbdataFree(state); *************** *** 308,313 **** --- 316,324 ---- storeUnlockObject(state->sentry); cbdataFree(state); return; + } else if (fwdCheckDeferRead(-1, state->sentry)) { + eventAdd("statObjects", statObjects, state, 0.1, 1); + return; } storeBuffer(state->sentry); debug(49, 3) ("statObjects: Bucket #%d\n", state->bucket); *************** *** 319,324 **** --- 330,336 ---- continue; statStoreEntry(state->sentry, e); } + state->bucket++; eventAdd("statObjects", statObjects, state, 0.0, 1); storeBufferFlush(state->sentry); } diff -Ncr squid-199807232310/src/store.c squid-199807260104/src/store.c *** squid-199807232310/src/store.c Thu Jul 23 12:57:54 1998 --- squid-199807260104/src/store.c Sun Jul 26 00:01:18 1998 *************** *** 1,6 **** /* ! * $Id: store.c,v 1.433 1998/07/23 19:57:54 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived --- 1,6 ---- /* ! * $Id: store.c,v 1.438 1998/07/26 07:01:18 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived *************** *** 176,182 **** e, storeKeyText(key)); e->key = storeKeyDup(key); hash_join(store_table, (hash_link *) e); ! dlinkAdd(e, &e->lru, &store_list); } static void --- 176,185 ---- e, storeKeyText(key)); e->key = storeKeyDup(key); hash_join(store_table, (hash_link *) e); ! if (EBIT_TEST(e->flag, KEY_PRIVATE)) ! dlinkAddTail(e, &e->lru, &store_list); ! else ! dlinkAdd(e, &e->lru, &store_list); } static void *************** *** 598,603 **** --- 601,607 ---- for (m = store_list.tail; m; m = prev) { prev = m->prev; e = m->data; + scanned++; if (storeEntryLocked(e)) { /* * If there is a locked entry at the tail of the LRU list, *************** *** 615,623 **** expired++; storeRelease(e); } ! if (expired > max_remove) break; ! if (++scanned > max_scan) break; } debug(20, 3) ("storeMaintainSwapSpace stats:\n"); --- 619,627 ---- expired++; storeRelease(e); } ! if (expired >= max_remove) break; ! if (scanned >= max_scan) break; } debug(20, 3) ("storeMaintainSwapSpace stats:\n"); *************** *** 1032,1037 **** --- 1036,1042 ---- { EBIT_CLR(e->flag, DELAY_SENDING); InvokeHandlers(e); + storeCheckSwapOut(e); } void diff -Ncr squid-199807232310/src/store_rebuild.c squid-199807260104/src/store_rebuild.c *** squid-199807232310/src/store_rebuild.c Wed Jul 22 13:38:00 1998 --- squid-199807260104/src/store_rebuild.c Fri Jul 24 21:47:28 1998 *************** *** 1,5 **** /* ! * $Id: store_rebuild.c,v 1.42 1998/07/22 20:38:00 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels --- 1,5 ---- /* ! * $Id: store_rebuild.c,v 1.44 1998/07/25 04:47:28 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels *************** *** 595,606 **** e = (StoreEntry *) link_ptr; if (EBIT_TEST(e->flag, ENTRY_VALIDATED)) continue; if (e->swap_file_number < 0) continue; - if (EBIT_TEST(e->flag, RELEASE_REQUEST)) { - storeRelease(e); - continue; - } if (opt_store_doublecheck) { struct stat sb; if (stat(storeSwapFullPath(e->swap_file_number, NULL), &sb) < 0) { --- 595,606 ---- e = (StoreEntry *) link_ptr; if (EBIT_TEST(e->flag, ENTRY_VALIDATED)) continue; + /* + * Calling storeRelease() has no effect because we're + * still in 'store_rebuilding' state + */ if (e->swap_file_number < 0) continue; if (opt_store_doublecheck) { struct stat sb; if (stat(storeSwapFullPath(e->swap_file_number, NULL), &sb) < 0) { diff -Ncr squid-199807232310/src/tools.c squid-199807260104/src/tools.c *** squid-199807232310/src/tools.c Wed Jul 22 13:38:02 1998 --- squid-199807260104/src/tools.c Fri Jul 24 21:47:29 1998 *************** *** 1,6 **** /* ! * $Id: tools.c,v 1.164 1998/07/22 20:38:02 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived --- 1,6 ---- /* ! * $Id: tools.c,v 1.166 1998/07/25 04:47:29 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived *************** *** 48,54 **** static void fatal_common(const char *); static void fatalvf(const char *fmt, va_list args); static void mail_warranty(void); - static void shutdownTimeoutHandler(int fd, void *data); #if USE_ASYNC_IO static void safeunlinkComplete(void *data, int retcode, int errcode); #endif --- 48,53 ---- *************** *** 290,322 **** } static void - shutdownTimeoutHandler(int fd, void *datanotused) - { - debug(21, 1) ("Forcing close of FD %d\n", fd); - comm_close(fd); - } - - void - setSocketShutdownLifetimes(int to) - { - fde *f = NULL; - int i; - for (i = Biggest_FD; i >= 0; i--) { - f = &fd_table[i]; - if (!f->read_handler && !f->write_handler) - continue; - if (f->type != FD_SOCKET) - continue; - if (f->timeout > 0 && (int) (f->timeout - squid_curtime) <= to) - continue; - commSetTimeout(i, - to, - f->timeout_handler ? f->timeout_handler : shutdownTimeoutHandler, - f->timeout_data); - } - } - - static void fatal_common(const char *message) { #if HAVE_SYSLOG --- 289,294 ---- *************** *** 767,772 **** --- 739,757 ---- list->head = m; if (list->tail == NULL) list->tail = m; + } + + void + dlinkAddTail(void *data, dlink_node * m, dlink_list * list) + { + m->data = data; + m->next = NULL; + m->prev = list->tail; + if (list->tail) + list->tail->next = m; + list->tail = m; + if (list->head == NULL) + list->head = m; } void