Revamp status item handling.
[paraslash.git] / file_write.c
index 533d33313136133f675a80ca7db98a2aba6f8346..92777d7ddc4af81b173b5017559af6ea1a1af407 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -46,7 +46,7 @@ static int file_write_open(struct writer_node *wn)
        if (!conf->filename_given)
                free(filename);
        if (pfwd->fd >= 0)
-               return 8192;
+               return 1;
        free(pfwd);
        return -E_FW_OPEN;
 }
@@ -79,7 +79,7 @@ static int file_write_post_select(struct sched *s, struct writer_node *wn)
        if (!FD_ISSET(pfwd->fd, &s->wfds))
                return 1;
 //     PARA_INFO_LOG("writing %zd\n", *wng->loaded);
-       ret = write(pfwd->fd, wng->buf + wn->written,
+       ret = write(pfwd->fd, *wng->bufp + wn->written,
                *wng->loaded - wn->written);
        if (ret < 0)
                return -E_FW_WRITE;