]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
net: Remove networking headers from para.h.
[paraslash.git] / server.c
index f26abef5753204c4628c4183519f50f02b8f674e..f92ef5518cd507ea5e1ef6026e03f841f4b37e37 100644 (file)
--- a/server.c
+++ b/server.c
@@ -8,10 +8,7 @@
 
 
 /**
- * \mainpage Paraslash API Reference
- *
- * Starting points for getting an overview:
- *
+ * \mainpage Starting points for getting an overview:
  *
  *     - The main programs: \ref server.c, \ref audiod.c, \ref client.c,
  *       \ref audioc.c, \ref afh.c, \ref play.c,
  *     - Forward error correction: \ref fec.c.
  */
 
+#include <netinet/in.h>
+#include <sys/socket.h>
 #include <signal.h>
 #include <regex.h>
 #include <osl.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+#include <netdb.h>
 
 #include "para.h"
 #include "error.h"
@@ -391,6 +394,9 @@ static int command_post_select(struct sched *s, struct task *t)
                goto out;
        }
        if (child_pid) {
+               /* avoid problems with non-fork-safe PRNGs */
+               unsigned char buf[16];
+               get_random_bytes_or_die(buf, sizeof(buf));
                close(new_fd);
                /* parent keeps accepting connections */
                return 0;