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 d4a2972..ac692bc 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;