From 4d829b96824277cb506d89f30a5d76f2c93d89b2 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/squid/trunk@1051 ab2d0c66-481e-0410-8bed-d214d4d58bed --- squid-controller.lua | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/squid-controller.lua b/squid-controller.lua index 6f69caa..ebc6133 100644 --- a/squid-controller.lua +++ b/squid-controller.lua @@ -7,17 +7,13 @@ default_action = "basic" dep = function( self ) if self.model.dependancy_ok() then - self.conf.type = "redir" - self.conf.action = "basic" - error(self.conf) + redirect(self) end if self.clientdata.cmd then if self.clientdata.cmd == "create file" then self.model.create_cfg_from_template() - self.conf.type = "redir" - self.conf.action = "basic" - error(self.conf) + redirect(self) end end @@ -36,9 +32,7 @@ basic = function( self ) } if not self.model.dependancy_ok() then - self.conf.type = "redir" - self.conf.action = "dep" - error(self.conf) + redirect(self, "dep") end local service = { message="", status="", error="" } -- cgit v1.2.3