JackOfAll wrote:
> >
Code:
--------------------
> > /usr/bin/squeezelite -n SqueezeliteWAND -m 00:1f:7b:b4:01:01 -o
hw:CARD=Audio -a 35280:8820:: -f /tmp/squeezelite.log -d slimproto=info -d
stream=debug -d decode=debug -d output=debug -u vM::2 -v -s 127.0.0.1
--------------------
> >
>
> Sorry, I cut&pasted from ps axfwww which results in the ':' and '='
> being screwed up. Maybe something to do with '-v' option and space
> between it and '-s' options being 'mis-interpreted' by cmd-line arg
> passing. Just more speculation again.... ;)
>
> Yep, extra space screwing up cmd-line parsing,
> /etc/sysconfig/squeezelite: 'VISULIZER="-v "'.
>
> >
Code:
--------------------
> >
> # Updated by Community Squeeze web-gui at 2014/01/10 11:12:04 GMT
> NAME="-n SqueezeliteWAND"
> MAC="-m 00:1f:7b:b4:01:01"
> AUDIO_DEV="-o hw:CARD=Audio"
> LOG_FILE="-f /tmp/squeezelite.log"
> LOG_LEVEL="-d slimproto=info -d stream=debug -d decode=debug -d
output=debug"
> # LOG_LEVEL="-d all=debug"
> ALSA_PARAMS="-a 35280:8820::"
> SERVER_IP="-s 127.0.0.1"
> UPSAMPLE="-u vM::2"
> VISULIZER="-v "
>
--------------------
> >
>
> I'll go fix the web-gui so it doesn't put a space after the '-v'.
> There isn't an optional arg that follows it, so not needed anyway.
Just to check - this should flag the bad command line - it looks like in
this case it is getting an argv[] entry which is " "
Code:
--------------------
diff --git a/main.c b/main.c
index c0be743..da614ef 100644
--- a/main.c
+++ b/main.c
@@ -355,6 +355,11 @@ int main(int argc, char **argv) {
}
}
+ if (optind < argc) {
+ usage(argv[0]);
+ exit(0);
+ }
+
signal(SIGINT, sighandler);
signal(SIGTERM, sighandler);
#if defined(SIGQUIT)
--------------------
------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=99395
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix