This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 70e2127e3a Fix lua plugin build (#10319)
70e2127e3a is described below

commit 70e2127e3a6ef69ff677acc15f45b450c2350647
Author: Masaori Koshiba <[email protected]>
AuthorDate: Thu Aug 31 22:39:51 2023 +0900

    Fix lua plugin build (#10319)
---
 plugins/lua/ts_lua_log.cc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/plugins/lua/ts_lua_log.cc b/plugins/lua/ts_lua_log.cc
index ceeaf644cf..eb6446c1d0 100644
--- a/plugins/lua/ts_lua_log.cc
+++ b/plugins/lua/ts_lua_log.cc
@@ -18,7 +18,7 @@
 
 #include "ts_lua_util.h"
 
-static TSTextLogObject log;
+static TSTextLogObject ts_log;
 
 static int ts_lua_log_object_creat(lua_State *L);
 static int ts_lua_log_object_write(lua_State *L);
@@ -64,9 +64,9 @@ ts_lua_log_object_creat(lua_State *L)
     log_mode = luaL_checknumber(L, 3);
   }
 
-  error = TSTextLogObjectCreate(log_name, log_mode, &log);
+  error = TSTextLogObjectCreate(log_name, log_mode, &ts_log);
 
-  if (!log || error == TS_ERROR) {
+  if (!ts_log || error == TS_ERROR) {
     TSError("[ts_lua][%s] Unable to create log <%s>", __FUNCTION__, log_name);
     return -1;
   }
@@ -87,8 +87,8 @@ ts_lua_log_object_write(lua_State *L)
   size_t text_len;
 
   text = luaL_checklstring(L, 1, &text_len);
-  if (log) {
-    TSTextLogObjectWrite(log, (char *)text, nullptr);
+  if (ts_log) {
+    TSTextLogObjectWrite(ts_log, (char *)text, nullptr);
   } else {
     TSError("[ts_lua][%s] log object does not exist for write", __FUNCTION__);
   }
@@ -106,7 +106,7 @@ ts_lua_inject_log_object_destroy_api(lua_State *L)
 static int
 ts_lua_log_object_destroy(lua_State *L ATS_UNUSED)
 {
-  if (TSTextLogObjectDestroy(log) != TS_SUCCESS) {
+  if (TSTextLogObjectDestroy(ts_log) != TS_SUCCESS) {
     TSError("[ts_lua][%s] TSTextLogObjectDestroy error!", __FUNCTION__);
   }
 

Reply via email to