]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
David Luyer's fixes
authorwessels <>
Fri, 14 Nov 1997 11:55:05 +0000 (11:55 +0000)
committerwessels <>
Fri, 14 Nov 1997 11:55:05 +0000 (11:55 +0000)
- poll() for Linux
- SHA optimizations
- errno clashes
- storeDirCloseSwapLogs(); logs might not be open.

src/client_side.cc
src/comm.cc
src/disk.cc
src/squid.h
src/store_dir.cc

index c7ffc3bd2d532c7b2920a04ae06166d4e460fc84..64f8ee32808ec440718284a822478d27f4f8686c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.148 1997/11/13 00:17:08 wessels Exp $
+ * $Id: client_side.cc,v 1.149 1997/11/14 04:55:05 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1570,6 +1570,8 @@ clientReadRequest(int fd, void *data)
            request->http_ver = http->http_ver;
            request->headers = headers;
            request->headers_sz = headers_sz;
+if (request->http_ver < 1.0 || request->http_ver > 1.1)
+debug(0,0)("Got HTTP version %f\n", http->http_ver);
            if (!urlCheckRequest(request)) {
                err = errorCon(ERR_UNSUP_REQ, HTTP_NOT_IMPLEMENTED);
                err->src_addr = conn->peer.sin_addr;
index 2a52670576a19dde140212c6568e30561e10d6cf..6c1d0b4540ef5a265f6d8d4f48b07be0cd785e13 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.202 1997/11/12 00:08:46 wessels Exp $
+ * $Id: comm.cc,v 1.203 1997/11/14 04:55:06 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -158,7 +158,7 @@ static int fdIsHttpOrIcp(int fd);
 static IPH commConnectDnsHandle;
 static void commConnectCallback(ConnectStateData * cs, int status);
 static int commDeferRead(int fd);
-static int ignoreErrno(int errno);
+static int ignoreErrno(int);
 static void commSetConnectTimeout(int fd, time_t timeout);
 static int commResetFD(ConnectStateData * cs);
 static int commRetryConnect(ConnectStateData * cs);
@@ -1392,17 +1392,17 @@ comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE
 }
 
 static int
-ignoreErrno(int errno)
+ignoreErrno(int ierrno)
 {
-    if (errno == EWOULDBLOCK)
+    if (ierrno == EWOULDBLOCK)
        return 1;
 #if EAGAIN != EWOULDBLOCK
-    if (errno == EAGAIN)
+    if (ierrno == EAGAIN)
        return 1;
 #endif
-    if (errno == EALREADY)
+    if (ierrno == EALREADY)
        return 1;
-    if (errno == EINTR)
+    if (ierrno == EINTR)
        return 1;
     return 0;
 }
index 05eb9c713e76f27a1e95e03788a066ca0b164799..905781a9ad3798520a4f48b0191232b361f742d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: disk.cc,v 1.93 1997/11/12 00:10:45 wessels Exp $
+ * $Id: disk.cc,v 1.94 1997/11/14 04:55:07 wessels Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -378,8 +378,8 @@ static void
 diskHandleRead(int fd, void *data)
 {
     dread_ctrl *ctrl_dat = data;
-    fde *F = &fd_table[fd];
 #if !USE_ASYNC_IO
+    fde *F = &fd_table[fd];
     int len;
 #endif
     disk_ctrl_t *ctrlp = xcalloc(1, sizeof(disk_ctrl_t));
index f040873bd5a4abaecf4b4b9de2fc74e88b527e44..ccf3f94596719b032345d2fb1c686aa11e5ae003 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.134 1997/11/10 21:07:05 wessels Exp $
+ * $Id: squid.h,v 1.135 1997/11/14 04:55:08 wessels Exp $
  *
  * AUTHOR: Duane Wessels
  *
 #endif
 
 #if PURIFY
+/* disable assert() under purify */
+#define NODEBUG
 #define LOCAL_ARRAY(type,name,size) \
         static type *local_##name=NULL; \
         type *name = local_##name ? local_##name : \
index c48a1feb60d3207aa469ce08d37536be289f7c0f..4a955fd6148afcb48ebaa94ef560e7c448cd634f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.37 1997/11/12 00:09:10 wessels Exp $
+ * $Id: store_dir.cc,v 1.38 1997/11/14 04:55:09 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -281,6 +281,8 @@ storeDirCloseSwapLogs(void)
     SwapDir *SD;
     for (i = 0; i < Config.cacheSwap.n_configured; i++) {
        SD = &Config.cacheSwap.swapDirs[i];
+       if (SD->swaplog_fd < 0) /* not open */
+           continue;
        file_close(SD->swaplog_fd);
        debug(47, 3) ("Cache Dir #%d log closed on FD %d\n", i, SD->swaplog_fd);
        SD->swaplog_fd = -1;