]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Mon, 29 May 2000 06:52:31 +0000 (06:52 +0000)
committerwessels <>
Mon, 29 May 2000 06:52:31 +0000 (06:52 +0000)
 - I'm getting a cbdata assertion when trying to 'cbdataFree' a
   store_client.  Its probably from this call to storeUnregister
   with http->sc instead of http->old_sc.  Regardless, its a good
   idea to always NULL http->sc after calling unregister.

src/client_side.cc

index 6cb7d030b3ee990f3032b8f03ad4c29c0ff4ea4e..b71c685f52f74e8d841df5c8ece26219ae8b9970 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.485 2000/05/16 07:06:03 wessels Exp $
+ * $Id: client_side.cc,v 1.486 2000/05/29 00:52:31 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -750,6 +750,7 @@ httpRequestFree(void *data)
     if ((e = http->entry)) {
        http->entry = NULL;
        storeUnregister(http->sc, e, http);
+       http->sc = NULL;
        storeUnlockObject(e);
     }
     /* old_entry might still be set if we didn't yet get the reply
@@ -757,6 +758,7 @@ httpRequestFree(void *data)
     if ((e = http->old_entry)) {
        http->old_entry = NULL;
        storeUnregister(http->sc, e, http);
+       http->old_sc = NULL;
        storeUnlockObject(e);
     }
     requestUnlink(http->request);
@@ -1311,6 +1313,7 @@ clientCacheHit(void *data, char *buf, ssize_t size)
        if ((e = http->entry)) {
            http->entry = NULL;
            storeUnregister(http->sc, e, http);
+           http->sc = NULL;
            storeUnlockObject(e);
        }
        clientProcessMiss(http);
@@ -1420,6 +1423,7 @@ clientCacheHit(void *data, char *buf, ssize_t size)
            http->log_type = LOG_TCP_IMS_HIT;
            memFree(buf, MEM_CLIENT_SOCK_BUF);
            storeUnregister(http->sc, e, http);
+           http->sc = NULL;
            storeUnlockObject(e);
            e = clientCreateStoreEntry(http, http->request->method, null_request_flags);
            /*
@@ -1690,6 +1694,7 @@ clientSendMoreData(void *data, char *buf, ssize_t size)
            ErrorState *err = errorCon(ERR_TOO_BIG, HTTP_FORBIDDEN);
            err->request = requestLink(http->request);
            storeUnregister(http->sc, http->entry, http);
+           http->sc = NULL;
            storeUnlockObject(http->entry);
            http->entry = clientCreateStoreEntry(http, http->request->method,
                null_request_flags);
@@ -1915,6 +1920,7 @@ clientProcessOnlyIfCachedMiss(clientHttpRequest * http)
     err->src_addr = http->conn->peer.sin_addr;
     if (http->entry) {
        storeUnregister(http->sc, http->entry, http);
+       http->sc = NULL;
        storeUnlockObject(http->entry);
     }
     http->entry = clientCreateStoreEntry(http, r->method, null_request_flags);
@@ -2081,6 +2087,7 @@ clientProcessMiss(clientHttpRequest * http)
            storeEntryDump(http->entry, 1);
        }
        storeUnregister(http->sc, http->entry, http);
+       http->sc = NULL;
        storeUnlockObject(http->entry);
        http->entry = NULL;
     }