]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implement 'sync'
authoradrian <>
Mon, 13 Aug 2001 04:23:22 +0000 (04:23 +0000)
committeradrian <>
Mon, 13 Aug 2001 04:23:22 +0000 (04:23 +0000)
src/fs/coss/async_io.cc

index 0f6045000fa8e1edd7e8d1a31db6469b665fc5a2..1e4f0513f00d20e09043451182c89d7463b1cf68 100644 (file)
@@ -11,7 +11,7 @@
  * supports are read/write, and since COSS works on a single file
  * per storedir it should work just fine.
  *
- * $Id: async_io.cc,v 1.4 2001/08/12 15:29:58 adrian Exp $
+ * $Id: async_io.cc,v 1.5 2001/08/12 22:23:22 adrian Exp $
  */
 
 #include "squid.h"
@@ -240,7 +240,13 @@ a_file_syncqueue(async_queue_t *q)
 {
        assert(q->aq_state == AQ_STATE_SETUP);
 
-       /* Good point? :-) */
+       /*
+        * Keep calling callback to complete ops until the queue is empty
+        * We can't quit when callback returns 0 - some calls may not
+        * return any completed pending events, but they're still pending!
+        */
+       while (q->aq_numpending)
+               a_file_callback(q);
 }