aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_util.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-14 10:31:04 -0800
committerGuy Harris <guy@alum.mit.edu>2014-11-14 18:31:34 +0000
commit7390516f61e64568e8cbdee64dbb6b908bbc2676 (patch)
treefe3df59e8bbc67667af55349680d610176e2fddf /epan/wslua/wslua_util.c
parent09f0d2c6c4ac65f6e05c0943c4fb1ede42b1b633 (diff)
For tap UIs, register a list of parameters and some menu information.
The intent here is to centralize more UI information so that we can move more tap UI stuff to common code. This is a beginning. Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30 Reviewed-on: https://code.wireshark.org/review/5301 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/wslua/wslua_util.c')
-rw-r--r--epan/wslua/wslua_util.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/wslua/wslua_util.c b/epan/wslua/wslua_util.c
index d9c2766fdc..4db45287a2 100644
--- a/epan/wslua/wslua_util.c
+++ b/epan/wslua/wslua_util.c
@@ -264,13 +264,21 @@ WSLUA_FUNCTION wslua_register_stat_cmd_arg(lua_State* L) {
#define WSLUA_OPTARG_register_stat_cmd_arg_ACTION 2 /* Action */
const char* arg = luaL_checkstring(L,WSLUA_ARG_register_stat_cmd_arg_ARGUMENT);
statcmd_t* sc = (statcmd_t *)g_malloc0(sizeof(statcmd_t)); /* XXX leaked */
+ tap_ui ui_info;
sc->L = L;
lua_pushvalue(L, WSLUA_OPTARG_register_stat_cmd_arg_ACTION);
sc->func_ref = luaL_ref(L, LUA_REGISTRYINDEX);
lua_remove(L,1);
- register_stat_cmd_arg(arg, statcmd_init, sc);
+ ui_info.group = REGISTER_STAT_GROUP_UNSORTED; /* XXX - need group for CLI-only? */
+ ui_info.title = NULL;
+ ui_info.cli_string = arg;
+ ui_info.tap_init_cb = statcmd_init;
+ ui_info.index = -1;
+ ui_info.nparams = 0;
+ ui_info.params = NULL;
+ register_tap_ui(&ui_info, sc);
return 0;
}