]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
call the store_client callback with size 0 in storeUnregister if
authorwessels <>
Wed, 29 Oct 1997 09:32:08 +0000 (09:32 +0000)
committerwessels <>
Wed, 29 Oct 1997 09:32:08 +0000 (09:32 +0000)
the callback is set.

src/store.cc

index 5fdec3bf40a24cbdf0a3f5e8de9f7d3d6c95bb3e..3c81f7df372500633684ea85bda5b08fc7d45872 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.324 1997/10/28 21:59:13 wessels Exp $
+ * $Id: store.cc,v 1.325 1997/10/29 02:32:08 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -733,6 +733,7 @@ storeUnregister(StoreEntry * e, void *data)
     MemObject *mem = e->mem_obj;
     store_client *sc;
     store_client **S;
+    STCB *callback;
     if (mem == NULL)
        return 0;
     debug(20, 3) ("storeUnregister: called for '%s'\n", e->key);
@@ -750,8 +751,11 @@ storeUnregister(StoreEntry * e, void *data)
        commSetSelect(sc->swapin_fd, COMM_SELECT_READ, NULL, NULL, 0);
        file_close(sc->swapin_fd);
     }
-    if (sc->callback)
+    if ((callback = sc->callback)) {
        debug(20,1)("WARNING: store_client for %s has a callback\n", e->url);
+       sc->callback = NULL;
+       callback(sc->callback_data, sc->copy_buf, 0);
+    }
     cbdataFree(sc);
     return 1;
 }