X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=audiod.c;h=d4b728af4442fdee278c2d6f05e1e46d18c3bc88;hb=9207a81bf1bb5b6bd4db7e2640994e0cfc5f9a3f;hp=58d65275c6b9cb0b31017ec233b68d69502e7435;hpb=07caf51b881e2f8e93fbcf529ea1a9b14a40f82e;p=paraslash.git diff --git a/audiod.c b/audiod.c index 58d65275..d4b728af 100644 --- a/audiod.c +++ b/audiod.c @@ -33,7 +33,7 @@ INIT_AUDIOD_ERRLISTS; /** define the array containing all supported audio formats */ const char *audio_formats[] = {AUDIOD_AUDIO_FORMAT_ARRAY NULL}; -/** defines how to handle one supported audio format */ +/** Defines how audiod handles one supported audio format. */ struct audio_format_info { /** pointer to the receiver for this audio format */ struct receiver *receiver; @@ -118,6 +118,9 @@ struct command_task { int get_audio_format_num(char *name) { int i; + + while (isspace(*name)) + name++; FOR_EACH_AUDIO_FORMAT(i) if (!strcmp(name, audio_formats[i])) return i; @@ -516,7 +519,7 @@ static int check_stat_line(char *line, __a_unused void *data) case SI_OFFSET: stat_task->offset_seconds = atoi(line + ilen + 1); break; - case SI_LENGTH: + case SI_SECONDS_TOTAL: stat_task->length_seconds = atoi(line + ilen + 1); break; case SI_STREAM_START: @@ -958,7 +961,7 @@ static void close_stat_pipe(void) audiod_status_dump(); stat_task->playing = 0; stat_task->stat_item_values[SI_BASENAME] = make_message( - "%s:no connection to para_server\n", + "%s: no connection to para_server\n", status_item_list[SI_BASENAME]); stat_client_write(stat_task->stat_item_values[SI_BASENAME], SI_BASENAME);