summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openntpd-read-html.lsp15
1 files changed, 8 insertions, 7 deletions
diff --git a/openntpd-read-html.lsp b/openntpd-read-html.lsp
index 73caead..5c88cbc 100644
--- a/openntpd-read-html.lsp
+++ b/openntpd-read-html.lsp
@@ -27,12 +27,14 @@
<dt>Timeserver hosts...</dt>
<dd>
<select name="" size="3" style="width:200px;">
-<? for i = 1, table.maxn(view.filecontent.servers) do ?>
+<? if (view.filecontent.servers) then
+for i = 1, table.maxn(view.filecontent.servers) do ?>
<option name="<? io.write(view.filecontent.servers[i].value) ?>"><? io.write(view.filecontent.servers[i].value) ?></option>
-<? end ?>
-<? for i = 1, table.maxn(view.filecontent.server) do ?>
+<? end end ?>
+<? if (view.filecontent.server) then
+for i = 1, table.maxn(view.filecontent.server) do ?>
<option name="<? io.write(view.filecontent.server[i].value) ?>"><? io.write(view.filecontent.server[i].value) ?></option>
-<? end ?>
+<? end end ?>
</select><BR>
In most cases you could use <i><b>pool.ntp.org</b></i> or <i><b>[countryname].pool.ntp.org</i></b> (if listed in <i><b>http://www.pool.ntp.org/</b></i>).
</dd>
@@ -47,11 +49,10 @@ In most cases you could use <i><b>pool.ntp.org</b></i> or <i><b>[countryname].po
<dt>Listen on address...</dt>
<dd>
<select name="" size="3" style="width:200px;">
-<? ---[[
-if (view.filecontent.listen) then
+<? if (view.filecontent.listen) then
for i = 1, table.maxn(view.filecontent.listen) do ?>
<option name="<? io.write(view.filecontent.listen[i].value) ?>"><? io.write(view.filecontent.listen[i].value) ?></option>
-<? end end--]]?>
+<? end end ?>
</select><BR>Empty list = Not listening or acting as server; "*" = All local addresses
</dd>