Networkespool: use FileMoveChunked(); since the others won't read or won't write...
authorWilfried Goesgens <dothebart@citadel.org>
Wed, 13 Jun 2012 22:53:07 +0000 (00:53 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Wed, 13 Jun 2012 22:53:07 +0000 (00:53 +0200)
citadel/modules/network/serv_netspool.c

index 479b303de7562ecdfcb63f2dc384035778d4ead1..6c2acb16201be139d79296fb27d2ba32e27a5e58 100644 (file)
@@ -877,8 +877,8 @@ void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netm
                        FDIOBufferInit(&FDIO, &IOB, fd, fsize + dsize);
                        FDIO.ChunkSendRemain = fsize;
                        FDIO.TotalSentAlready = dsize;
-
-                       do {} while (FileRecvChunked(&FDIO, &err) > 0);
+                       err = NULL;
+                       do {} while ((FileMoveChunked(&FDIO, &err) > 0) && (err == NULL));
                        if (err == NULL) {
                                unlink(filename);
                        }