]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
need to check mem_obj->inmem_hi instead of e->object_len because while
authorwessels <>
Wed, 22 Oct 1997 11:50:28 +0000 (11:50 +0000)
committerwessels <>
Wed, 22 Oct 1997 11:50:28 +0000 (11:50 +0000)
STORE_PENDING, object_len always == 0.

src/ftp.cc
src/gopher.cc
src/http.cc

index f2b8a4965f299273dca2177782ebf6b4e3ca0115..048ab57440a8524553c24579ad2166e4c28fc95e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.142 1997/10/21 19:38:50 wessels Exp $
+ * $Id: ftp.cc,v 1.143 1997/10/22 05:50:28 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -233,7 +233,7 @@ ftpTimeout(int fd, void *data)
     StoreEntry *entry = ftpState->entry;
     ErrorState *err;
     debug(9, 4) ("ftpTimeout: FD %d: '%s'\n", fd, entry->url);
-    if (entry->object_len == 0) {
+    if (entry->mem_obj->inmem_hi == 0) {
        err = xcalloc(1, sizeof(ErrorState));
        err->type = ERR_READ_TIMEOUT;
        err->http_status = HTTP_GATEWAY_TIMEOUT;
@@ -659,7 +659,7 @@ ftpReadData(int fd, void *data)
        if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {
            commSetSelect(fd, COMM_SELECT_READ, ftpReadData, data, 0);
        } else {
-           if (entry->object_len == 0) {
+           if (entry->mem_obj->inmem_hi == 0) {
                err = xcalloc(1, sizeof(ErrorState));
                err->type = ERR_READ_ERROR;
                err->errno = errno;
@@ -972,7 +972,7 @@ ftpWriteCommandCallback(int fd, char *buf, int size, int errflag, void *data)
     debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", size);
     if (errflag) {
        debug(50, 1) ("ftpWriteCommandCallback: FD %d: %s\n", fd, xstrerror());
-       if (entry->object_len == 0) {
+       if (entry->mem_obj->inmem_hi == 0) {
            err = xcalloc(1, sizeof(ErrorState));
            err->type = ERR_WRITE_ERROR;
            err->http_status = HTTP_SERVICE_UNAVAILABLE;
@@ -1050,7 +1050,7 @@ ftpReadControlReply(int fd, void *data)
                ftpState,
                0);
        } else {
-           if (entry->object_len == 0) {
+           if (entry->mem_obj->inmem_hi == 0) {
                err = xcalloc(1, sizeof(ErrorState));
                err->type = ERR_READ_ERROR;
                err->http_status = HTTP_INTERNAL_SERVER_ERROR;
index 262cfc1dc7b3721f8025f68965ca5084ef18c98d..5a54882ad9adab630a18eef9f1c6b1c9c297eb73 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: gopher.cc,v 1.99 1997/10/21 19:38:51 wessels Exp $
+ * $Id: gopher.cc,v 1.100 1997/10/22 05:50:29 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -653,7 +653,7 @@ gopherTimeout(int fd, void *data)
 
     debug(10, 4) ("gopherTimeout: FD %d: '%s'\n", fd, entry->url);
     /* was assert */
-    if (entry->object_len == 0) {
+    if (entry->mem_obj->inmem_hi == 0) {
        err = xcalloc(1, sizeof(ErrorState));
        err->type = ERR_READ_TIMEOUT;
        err->http_status = HTTP_GATEWAY_TIMEOUT;
index fbde0e45bb1eb74988431e40ee8c013bc08fe509..a7738a9e9c0e6322c7c7afe29ef7bd0fe3e116b6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: http.cc,v 1.192 1997/10/21 19:38:52 wessels Exp $
+ * $Id: http.cc,v 1.193 1997/10/22 05:50:30 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -248,7 +248,7 @@ httpTimeout(int fd, void *data)
     StoreEntry *entry = httpState->entry;
     ErrorState *err;
     debug(11, 4) ("httpTimeout: FD %d: '%s'\n", fd, entry->url);
-    if (entry->object_len == 0) {
+    if (entry->mem_obj->inmem_hi == 0) {
        err = xcalloc(1, sizeof(ErrorState));
        err->type = ERR_READ_TIMEOUT;
        err->http_status = HTTP_GATEWAY_TIMEOUT;
@@ -653,7 +653,7 @@ httpReadReply(int fd, void *data)
        if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) {
            commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0);
        } else {
-           if (entry->object_len == 0) {
+           if (clen == 0) {
                err = xcalloc(1, sizeof(ErrorState));
                err->type = ERR_READ_ERROR;
                err->errno = errno;