com_lsblob: Print an error message if no blob matched.
[paraslash.git] / audiod.c
index 74aa3865037f15f9c2e092599d54849f839a1dbf..4864c8550d35d66d813c9a553685f8cc761acd88 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -776,22 +776,19 @@ static int parse_writer_args(void)
 
                ret = parse_stream_command(conf.writer_arg[i], &cmd);
                if (ret < 0)
-                       goto out;
+                       return ret;
                af_mask = ret;
                FOR_EACH_AUDIO_FORMAT(j) {
                        a = afi + j;
                        if ((af_mask & (1 << j)) == 0) /* no match */
                                continue;
-                       ret = -E_WRITE_COMMON_SYNTAX;
-                       wconf = check_writer_arg(cmd, &writer_num);
-                       if (!wconf)
-                               goto out;
+                       wconf = check_writer_arg_or_die(cmd, &writer_num);
                        nw = a->num_writers;
                        a->writer_nums = para_realloc(a->writer_nums, (nw + 1) * sizeof(int));
                        a->writer_conf = para_realloc(a->writer_conf, (nw + 1) * sizeof(void *));
                        a->writer_nums[nw] = writer_num;
                        a->writer_conf[nw] = wconf;
-                       PARA_INFO_LOG("%s writer #%d: %s\n", audio_formats[writer_num],
+                       PARA_INFO_LOG("%s writer #%d: %s\n", audio_formats[j],
                                nw, writer_names[writer_num]);
                        a->num_writers++;
                }
@@ -810,9 +807,7 @@ static int parse_writer_args(void)
                a->writer_conf[0] = w->parse_config_or_die("");
                a->num_writers = 1;
        }
-       ret = 1;
-out:
-       return ret;
+       return 1;
 }
 
 static int parse_receiver_args(void)
@@ -1375,7 +1370,7 @@ int main(int argc, char *argv[])
                exit(EXIT_FAILURE);
        }
        log_welcome("para_audiod");
-       server_uptime(UPTIME_SET);
+       set_server_start_time(NULL);
        set_initial_status();
        FOR_EACH_SLOT(i)
                clear_slot(i);