]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - server.c
Force status item update on mood/playlist changes.
[paraslash.git] / server.c
index 4bc85a345b6328041059da62443a0d544371e324..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);