trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [28/50] git commit: Call release function
Date Tue, 12 Jun 2012 15:51:37 GMT
Call release function


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f6bc13b9
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f6bc13b9
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f6bc13b9

Branch: refs/heads/jpeach/lua
Commit: f6bc13b95138221fd90b4ccf212267fd5ef70519
Parents: 32aa815
Author: James Peach <jpeach@apache.org>
Authored: Fri Apr 6 21:17:22 2012 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Tue Jun 12 08:48:34 2012 -0700

----------------------------------------------------------------------
 plugins/lua/lua.cc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f6bc13b9/plugins/lua/lua.cc
----------------------------------------------------------------------
diff --git a/plugins/lua/lua.cc b/plugins/lua/lua.cc
index 20f0c95..2e9d536 100644
--- a/plugins/lua/lua.cc
+++ b/plugins/lua/lua.cc
@@ -107,6 +107,13 @@ void
 TSRemapDeleteInstance(void * ih)
 {
   lua_State * lua = (lua_State *)ih;
+
+  lua_getglobal(lua, "release");
+  if (lua_pcall(lua, 0, 1, 0) != 0) {
+    TSDebug("lua", "init failed: %s", lua_tostring(lua, -1));
+    lua_pop(lua, 1);
+  }
+
   lua_close(lua);
 }
 


Mime
View raw message