]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
The opus audio format handler.
[paraslash.git] / server.c
index 57f0c26ee36e046e4390157f49352bb0e7fccf70..f3d5237f19cfbc69e01ca17851f698fda1b41779 100644 (file)
--- a/server.c
+++ b/server.c
@@ -278,13 +278,13 @@ static void handle_sighup(void)
                kill(mmd->afs_pid, SIGHUP);
 }
 
-static void signal_post_select(struct sched *s, __a_unused struct task *t)
+static int signal_post_select(struct sched *s, __a_unused struct task *t)
 {
        int signum = para_next_signal(&s->rfds);
 
        switch (signum) {
        case 0:
-               return;
+               return 0;
        case SIGHUP:
                handle_sighup();
                break;
@@ -329,6 +329,7 @@ cleanup:
                shm_detach(mmd);
                exit(EXIT_FAILURE);
        }
+       return 0;
 }
 
 static void init_signal_task(void)
@@ -357,7 +358,7 @@ static void command_pre_select(struct sched *s, struct task *t)
        para_fd_set(sct->listen_fd, &s->rfds, &s->max_fileno);
 }
 
-static void command_post_select(struct sched *s, struct task *t)
+static int command_post_select(struct sched *s, struct task *t)
 {
        struct server_command_task *sct = container_of(t, struct server_command_task, task);
 
@@ -391,7 +392,7 @@ static void command_post_select(struct sched *s, struct task *t)
        if (child_pid) {
                close(new_fd);
                /* parent keeps accepting connections */
-               return;
+               return 0;
        }
        /* mmd might already have changed at this point */
        free(chunk_table);
@@ -405,10 +406,12 @@ static void command_post_select(struct sched *s, struct task *t)
        for (i = sct->argc - 1; i >= 0; i--)
                memset(sct->argv[i], 0, strlen(sct->argv[i]));
        sprintf(sct->argv[0], "para_server (serving %s)", peer_name);
-       return handle_connect(new_fd, peer_name);
+       handle_connect(new_fd, peer_name);
+       /* never reached*/
 out:
        if (ret < 0)
                PARA_CRIT_LOG("%s\n", para_strerror(-ret));
+       return 0;
 }
 
 static void init_server_command_task(int argc, char **argv)