Append ls -v output to status items.
[paraslash.git] / audiod.c
index 58d65275c6b9cb0b31017ec233b68d69502e7435..d2d0004a157f961b239cf4a89f66fcf8c86c72a2 100644 (file)
--- 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;