server: Get rid of a dead store.
[paraslash.git] / server.c
index 43ede2a91b752667ad4090e2742c4a844bf66250..6529073fd4cec30e446ff70d6bc5eb593cf3ec0a 100644 (file)
--- a/server.c
+++ b/server.c
@@ -196,7 +196,6 @@ void parse_config_or_die(bool reload)
                        goto free_cf;
                if (ret == -ERRNO_TO_PARA_ERROR(ENOENT) && OPT_GIVEN(CONFIG_FILE))
                        goto free_cf;
-               ret = 0;
                server_lpr = cmdline_lpr;
                goto success;
        }
@@ -357,8 +356,6 @@ static int command_post_select(struct sched *s, void *context)
        ret = para_accept(sct->listen_fd, &s->rfds, NULL, 0, &new_fd);
        if (ret <= 0)
                goto out;
-       peer_name = remote_name(new_fd);
-       PARA_INFO_LOG("got connection from %s, forking\n", peer_name);
        mmd->num_connects++;
        mmd->active_connections++;
        /*
@@ -384,6 +381,8 @@ static int command_post_select(struct sched *s, void *context)
                /* parent keeps accepting connections */
                return 0;
        }
+       peer_name = remote_name(new_fd);
+       PARA_INFO_LOG("accepted connection from %s\n", peer_name);
        /* mmd might already have changed at this point */
        free(chunk_table);
        alarm(ALARM_TIMEOUT);
@@ -534,7 +533,7 @@ static void server_init(int argc, char **argv)
        init_signal_task();
        para_unblock_signal(SIGCHLD);
        PARA_NOTICE_LOG("initializing virtual streaming system\n");
-       init_vss_task(afs_socket, &sched);
+       vss_init(afs_socket, &sched);
        init_server_command_task(argc, argv);
        if (daemon_pipe >= 0) {
                if (write(daemon_pipe, "\0", 1) < 0) {