]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Buffer the StoreEntry when building a mime icon object.
authorwessels <>
Wed, 26 May 1999 10:57:46 +0000 (10:57 +0000)
committerwessels <>
Wed, 26 May 1999 10:57:46 +0000 (10:57 +0000)
Also set the ENTRY_SPECIAL flag before calling storeComplete so
that it gets swapped out with the new no-swapout-during-rebuild
scheme.

src/mime.cc

index 9dfaec567e57f088032ef64dc1fb19284cb7bbf0..ec3226955c8fab9d8d7298d26a31d637e14adb8d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.cc,v 1.87 1999/05/04 21:58:26 wessels Exp $
+ * $Id: mime.cc,v 1.88 1999/05/26 04:57:46 wessels Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -418,6 +418,7 @@ mimeLoadIconFile(const char *icon)
        METHOD_GET);
     assert(e != NULL);
     storeSetPublicKey(e);
+    storeBuffer(e);
     e->mem_obj->request = requestLink(urlParse(METHOD_GET, url));
     httpReplyReset(reply = e->mem_obj->reply);
     httpReplySetHeaders(reply, 1.0, HTTP_OK, NULL,
@@ -431,9 +432,10 @@ mimeLoadIconFile(const char *icon)
     while ((n = read(fd, buf, 4096)) > 0)
        storeAppend(e, buf, n);
     file_close(fd);
+    EBIT_SET(e->flags, ENTRY_SPECIAL);
+    storeBufferFlush(e);
     storeComplete(e);
     storeTimestampsSet(e);
-    EBIT_SET(e->flags, ENTRY_SPECIAL);
     debug(25, 3) ("Loaded icon %s\n", url);
     storeUnlockObject(e);
     memFree(buf, MEM_4K_BUF);