chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge memory hygeine branch
[disorder]
/
cgi
/
actions.c
diff --git
a/cgi/actions.c
b/cgi/actions.c
index 30ddba1ae03bea23b0e24e3eb1dbe5ff36318358..f6755b0317ad2ca080c1d28098e3902df38cb559 100644
(file)
--- a/
cgi/actions.c
+++ b/
cgi/actions.c
@@
-95,6
+95,10
@@
static void act_playing(void) {
if(refresh > config->gap)
refresh = config->gap;
}
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
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);
}
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");
disorder_unset(dcgi_client, file, "pick_at_random");
else
disorder_set(dcgi_client, file, "pick_at_random", "0");