X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2d0a6606ee8899dfe372bbdc760fd15c14f3fceb..30a821969dcd507dc7da2583fa0134492dfd82b2:/cgi/actions.c diff --git a/cgi/actions.c b/cgi/actions.c index 30ddba1..f6755b0 100644 --- a/cgi/actions.c +++ b/cgi/actions.c @@ -95,6 +95,10 @@ static void act_playing(void) { if(refresh > config->gap) refresh = config->gap; } + /* Bound the refresh interval below as a back-stop against the above + * calculations coming up with a stupid answer */ + if(refresh < config->refresh_min) + refresh = config->refresh_min; if((action = cgi_get("action"))) url = cgi_makeurl(config->url, "action", action, (char *)0); else @@ -608,7 +612,7 @@ static int process_prefs(int numfile) { byte_xasprintf((char **)&name, "trackname_%s_%s", context, part); disorder_set(dcgi_client, file, name, value); } - if((value = numbered_arg("random", numfile))) + if(numbered_arg("random", numfile)) disorder_unset(dcgi_client, file, "pick_at_random"); else disorder_set(dcgi_client, file, "pick_at_random", "0");