luci-app-olsr: handle empty result for non-status tables
[oweals/luci.git] / protocols / luci-proto-ppp / luasrc / model / cbi / admin_network / proto_pptp.lua
index 08c3c619313ec45f43d53bc4e0f07a43e22919c2..6a828efe9655bac007b788449f4b3dabc0d62b31 100644 (file)
@@ -1,4 +1,4 @@
--- Copyright 2011-2012 Jo-Philipp Wich <xm@subsignal.org>
+-- Copyright 2011-2012 Jo-Philipp Wich <jow@openwrt.org>
 -- Licensed to the public under the Apache License 2.0.
 
 local map, section, net = ...
@@ -9,7 +9,7 @@ local defaultroute, metric, peerdns, dns,
 
 
 server = section:taboption("general", Value, "server", translate("VPN Server"))
-server.datatype = "host"
+server.datatype = "host(0)"
 
 
 username = section:taboption("general", Value, "username", translate("PAP/CHAP username"))
@@ -82,7 +82,7 @@ function keepalive_interval.write(self, section, value)
        if f > 0 then
                m:set(section, "keepalive", "%d %d" %{ f, i })
        else
-               m:del(section, "keepalive")
+               m:set(section, "keepalive", "0")
        end
 end