]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
audiod: parse receiver arguments in reverse order
authorAndre <maan@p133.(none)>
Tue, 20 Jun 2006 21:10:36 +0000 (23:10 +0200)
committerAndre <maan@p133.(none)>
Tue, 20 Jun 2006 21:10:36 +0000 (23:10 +0200)
This allows to overwrite the receiver args of the config file by command line
options.

audiod.c

index d4a29720340457f56af41058d19651a3f0b559e3..ac692bc1b5468a2a0f075e8c74ffdf931f556cee 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -752,9 +752,10 @@ static int init_receivers(void)
                PARA_INFO_LOG("initializing %s receiver\n", receivers[i].name);
                receivers[i].init(&receivers[i]);
        }
-       for (i = 0; i < conf.receiver_given; i++) {
+       for (i = conf.receiver_given - 1; i >= 0; i--) {
                char *arg = conf.receiver_arg[i];
                char *recv = strchr(arg, ':');
+               PARA_INFO_LOG("arg: %s\n", arg);
                ret = -E_MISSING_COLON;
                if (!recv)
                        goto out;