From 44a0beb243fed22c519591968541d9f35b0c0ac7 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Wed, 10 Aug 2016 15:50:02 +0000 Subject: Remove trailing whitespace --- opennhrp-model.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'opennhrp-model.lua') diff --git a/opennhrp-model.lua b/opennhrp-model.lua index 1fa81bd..c179b6a 100644 --- a/opennhrp-model.lua +++ b/opennhrp-model.lua @@ -47,7 +47,7 @@ local function list_interfaces(self) reverseinterfaceslist[int.value.name.value] = #interfaceslist end interfaces:destroy() - end + end return interfaceslist, reverseinterfaceslist end @@ -70,7 +70,7 @@ local function parseconfigfile(configfilecontent) if word == "interface" then i = i+1 currentinterface = words[i] - if config[currentinterface] then + if config[currentinterface] then config[currentinterface].errtxt = "Syntax error - interface defined multiple times" else config[currentinterface] = {} @@ -151,8 +151,8 @@ local function validateinterfacedetails(interfacedetails) for i,map in ipairs(interfacedetails.value.map.value) do local words = {} for word in string.gmatch(map, "%S+") do words[#words+1] = word end - if not words[1] or not words[2] or - (words[3] and words[3] ~= "register" and words[3] ~= "cicso") or + if not words[1] or not words[2] or + (words[3] and words[3] ~= "register" and words[3] ~= "cicso") or (words[4] and words[4] ~= "register" and words[4] ~= "cisco") or words[5] then interfacedetails.value.map.errtxt = "Syntax error on line "..i success = false @@ -184,7 +184,7 @@ function mymodule.get_startstop(self, clientdata) end function mymodule.startstop_service(self, startstop, action) - return modelfunctions.startstop_service(startstop, action) + return modelfunctions.startstop_service(startstop, action) end function mymodule.getstatus() @@ -224,7 +224,7 @@ function mymodule.getinterfacedetails(interface) details.type = cfe({ type="select", value="Unused", label="Interface type", option={"Unused", "NHRP Enabled", "Shortcut Destination"}, seq=2 }) details.map = cfe({ type="list", value={}, label="Static Peers", descr="List of static peer mappings of protocol-address to nbma-address. Optional 'register' parameter specifies Registration Request sent to this peer on startup. If the statically mapped peer is running Cisco IOS, specify the cisco keyword. (protocol-address[/prefix] nbma-address [register] [cisco])", seq=3 }) details["dynamic-map"] = cfe({ type="list", value={}, label="Dynamic Peers", descr="List of dynamic peer mappings of protocol-address to nbma-domain-name. For each A record in the domain nbma-domain-name, opennhrp creates a dynamic NHS entry. (protocol-address/prefix nbma-domain-name)", seq=4 }) - + configfilecontent = configfilecontent or fs.read_file(configfile) or "" config = config or parseconfigfile(configfilecontent) if config and config[interface] then -- cgit v1.2.3