buffer_handle: Remember that we closed the FD once the file is buffered.
authorNicolas Pennequin <nicolas.pennequin@free.fr>
Tue, 7 Aug 2007 18:04:06 +0000 (7 20:04 +0200)
committerNicolas Pennequin <nicolas.pennequin@free.fr>
Tue, 7 Aug 2007 18:04:06 +0000 (7 20:04 +0200)
testplugin.c

index d641b7a..3cc2db0 100644 (file)
@@ -370,6 +370,7 @@ static ssize_t buffer_handle(int handle_id)
     if (h->filerem == 0) {
         /* finished buffering the file */
         rb->close(h->fd);
+        h->fd = -1;
     }
 
     DEBUGF("buffered %ld bytes (%ld of %ld available, rem: %ld, off: %ld)\n",