string: Clean up for_each_line() and related functions.
[paraslash.git] / send_common.c
index 005583cf52bf425f67727df68600c1094a3c0ad8..250a2a0bc5a80f8973b33d43bcb2e12e3ee723e9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -7,7 +7,6 @@
 /** \file send_common.c Functions used by more than one paraslash sender. */
 
 #include <regex.h>
-#include <dirent.h>
 #include <osl.h>
 
 #include "para.h"
@@ -23,6 +22,7 @@
 #include "send.h"
 #include "close_on_fork.h"
 #include "chunk_queue.h"
+#include "sched.h"
 #include "vss.h"
 
 /** Clients will be kicked if there are more than that many bytes pending. */
@@ -113,7 +113,7 @@ int send_queued_chunks(int fd, struct chunk_queue *cq)
                int ret;
 
                cq_get(qc, &buf, &len);
-               ret = write_nonblock(fd, buf, len);
+               ret = xwrite(fd, buf, len);
                if (ret < 0)
                        return ret;
                cq_update(cq, ret);
@@ -261,6 +261,7 @@ void generic_com_off(struct sender_status *ss)
  * Accept a connection on the socket this server is listening on.
  *
  * \param ss The sender whose listening fd is ready for reading.
+ * \param rfds Passed to para_accept(),
  *
  * This must be called only if the socket fd of \a ss is ready for reading.  It
  * calls para_accept() to accept the connection and performs the following