]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- Fixed coredump-causing bugs in icpHandleIMSReply().
authorwessels <>
Thu, 12 Sep 1996 06:31:22 +0000 (06:31 +0000)
committerwessels <>
Thu, 12 Sep 1996 06:31:22 +0000 (06:31 +0000)
src/client_side.cc

index eedc371322154cfb49ab21bbbf443139941644df..91848d94529adcf88f08c6bb18aa4638b7e134d6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.19 1996/09/11 22:41:11 wessels Exp $
+ * $Id: client_side.cc,v 1.20 1996/09/12 00:31:22 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -435,22 +435,16 @@ int icpHandleIMSReply(fd, entry, data)
            fatal_dump("icpHandleIMSReply: failed to load headers, lost race");
        httpParseHeaders(hbuf, entry->mem_obj->reply);
        ttlSet(entry);
-       if (unlink_request)
+       if (unlink_request) {
            requestUnlink(entry->mem_obj->request);
+           entry->mem_obj->request = NULL;
+       }
     } else {
        /* the client can handle this reply, whatever it is */
        icpState->log_type = LOG_TCP_EXPIRED_MISS;
        storeUnlockObject(icpState->old_entry);
     }
-    /* done with old_entry */
-    icpState->old_entry = NULL;
-    /* switch the handler for incoming data */
-    if (entry->store_status != STORE_OK)
-       storeRegister(icpState->entry,
-           fd,
-           (PIF) icpHandleStore,
-           (void *) icpState);
-    /* give it to the client */
-    icpSendMoreData(fd, icpState);
+    icpState->old_entry = NULL;                /* done with old_entry */
+    icpSendMoreData(fd, icpState);     /* give data to the client */
     return 1;
 }