]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - write.h
fix multiple simultaneous writers
[paraslash.git] / write.h
diff --git a/write.h b/write.h
index 1c4a65fceefe4651af47f7e1df2aa14f55484c9a..79531b508839ea06947873cab38e770be0daba0f 100644 (file)
--- a/write.h
+++ b/write.h
@@ -31,9 +31,12 @@ struct writer_node {
        void *private_data;
        /** send that many bytes in one go */
        int chunk_bytes;
+       /** pointer to the group this node belongs to */
        struct writer_node_group *wng;
        /** the writer-specific configuration of this node */
        void *conf;
+       /** how much of the wng's buffer is already written */
+       size_t written;
 };
 
 /** describes one supported writer */
@@ -102,8 +105,6 @@ struct writer_node_group {
        unsigned num_writers;
        /** array of pointers to the corresponding writer nodes */
        struct writer_node *writer_nodes;
-       /** keeps track of how many bytes have been written by each node */
-       int *written;
        /** the maximum of the chunk_bytes values of the writer nodes in this group */
        size_t max_chunk_bytes;
        /** non-zero if end of file was encountered */