From 9aa99832f22823332fd12ad0ceb60626d725764c Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 28 Apr 2008 15:24:27 +0000 Subject: Changed error redir code to use redirect function instead git-svn-id: svn://svn.alpinelinux.org/acf/dhcp/trunk@1051 ab2d0c66-481e-0410-8bed-d214d4d58bed --- dhcp-controller.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dhcp-controller.lua b/dhcp-controller.lua index 6ba93ce..d60821c 100644 --- a/dhcp-controller.lua +++ b/dhcp-controller.lua @@ -11,9 +11,7 @@ dep = function( self ) -- make sure nobody accidentally calls this action if msg == nil then - self.conf.type = "redir" - self.conf.action = "home" - error (self.conf) + redirect(self, "home") end -- go ahead @@ -176,9 +174,7 @@ createnet = function ( self ) tmp.netmask, tmp.leaserangestart, tmp.leaserangeend, tmp.wpad, "", tmp.unknownclients, "", "", "" ) errcode, net = self.model.subnet_create( net ) if #errcode.msg == 0 then - self.conf.type = "redir" - self.conf.action = "home" - error (self.conf) + redirect(self, "home") else return ( cfe({ option = option, value = net, errcode = errcode }) ) end @@ -202,9 +198,7 @@ home = function ( self ) -- dependancy check for neccessary libs/packages et al. msg = self.model.dep_check() if msg ~= nil then - self.conf.type = "redir" - self.conf.action = "dep" - error(self.conf) + redirect(self, "dep") end local srvctrl = "" -- cgit v1.2.3