diff options
author | João Valverde <j@v6e.pt> | 2023-08-15 16:55:30 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-08-17 10:04:53 +0000 |
commit | 29ad6db8aa998bdea0c4ba043e535f7898a91abf (patch) | |
tree | 18955b373f38b4882545818a5296c854a34d953b /epan/wslua | |
parent | 90cc69536bb535b52ed9e2df21b2a0a2b7a0d01c (diff) |
epan: Remove obsolete "logger" funnel.h callback
This function is just a wrapper around ws_log() and has been
superseded by the more feature-complete full wslog API.
It doesn't seem to be exposed to Lua scripts so removing it
should not break anything Lua-related.
Diffstat (limited to 'epan/wslua')
-rw-r--r-- | epan/wslua/init_wslua.c | 13 | ||||
-rw-r--r-- | epan/wslua/wslua.h | 3 |
2 files changed, 0 insertions, 16 deletions
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c index ba5b8a88e0..3acec7e03e 100644 --- a/epan/wslua/init_wslua.c +++ b/epan/wslua/init_wslua.c @@ -47,7 +47,6 @@ static lua_State* L = NULL; packet_info* lua_pinfo; struct _wslua_treeitem* lua_tree; tvbuff_t* lua_tvb; -wslua_logger_t wslua_logger; int lua_dissectors_table_ref = LUA_NOREF; int lua_heur_dissectors_table_ref = LUA_NOREF; @@ -738,14 +737,6 @@ static gboolean lua_load_plugin_script(const gchar* name, return FALSE; } - -static void basic_logger(const gchar *log_domain, - enum ws_log_level log_level, - const gchar *message, - gpointer user_data _U_) { - ws_log(log_domain, log_level, "%s", message); -} - static int wslua_panic(lua_State* LS) { ws_error("LUA PANIC: %s",lua_tostring(LS,-1)); /** ws_error() does an abort() and thus never returns **/ @@ -1267,7 +1258,6 @@ static void lua_funnel_console_close(intptr_t wslua_print_ref, void wslua_init(register_cb cb, gpointer client_data) { gchar* filename; - const funnel_ops_t* ops = funnel_get_funnel_ops(); gboolean enable_lua = TRUE; gboolean run_anyway = FALSE; expert_module_t* expert_lua; @@ -1391,9 +1381,6 @@ void wslua_init(register_cb cb, gpointer client_data) { ws_lua_ei_len = array_length(ei); } - /* set up the logger */ - wslua_logger = ops ? ops->logger : basic_logger; - if (!L) { L = lua_newstate(wslua_allocf, NULL); } diff --git a/epan/wslua/wslua.h b/epan/wslua/wslua.h index f496d539b1..f38936d06f 100644 --- a/epan/wslua/wslua.h +++ b/epan/wslua/wslua.h @@ -57,9 +57,6 @@ #define WSLUA_INIT_ROUTINES "init_routines" #define WSLUA_PREFS_CHANGED "prefs_changed" -typedef void (*wslua_logger_t)(const gchar *, enum ws_log_level, const gchar *, gpointer); -extern wslua_logger_t wslua_logger; - /* type conversion macros - lua_Number is a double, so casting isn't kosher; and using Lua's already-available lua_tointeger() and luaL_checkinteger() might be different on different machines; so use these instead please! */ |