diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-05-10 15:56:57 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-05-10 15:56:57 +0000 |
commit | dc0c59240a6cb111576a1f565ff554b144da6de2 (patch) | |
tree | 6feea271b3aa10588969cb5bbbb059a267728064 /epan | |
parent | 3588b811b061fb146ac4f903178a0970bd13e293 (diff) |
Postpone marking objects as expired until the whole frame is completed.
We can have a case where one Lua dissector calls another Lua dissector,
so we can't mark all objects when only one dissector is completed.
This fixes comment #37 and #39 in bug 2453.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28325 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r-- | epan/wslua/init_wslua.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c index 96a7e170cb..20a70bdb4a 100644 --- a/epan/wslua/init_wslua.c +++ b/epan/wslua/init_wslua.c @@ -1,5 +1,5 @@ /* - * packet-lua.c + * init_wslua.c * * Wireshark's interface to the Lua Programming Language * @@ -27,6 +27,7 @@ */ #include "wslua.h" +#include <epan/dissectors/packet-frame.h> #include <epan/nstime.h> #include <math.h> #include <epan/expert.h> @@ -44,6 +45,14 @@ int lua_dissectors_table_ref; dissector_handle_t lua_data_handle; +static void lua_frame_end(void) +{ + clear_outstanding_Tvb(); + clear_outstanding_Pinfo(); + clear_outstanding_Column(); + clear_outstanding_Columns(); + clear_outstanding_TreeItem(); +} static int wslua_not_register_menu(lua_State* LS) { luaL_error(LS,"too late to register a menu"); @@ -104,12 +113,7 @@ int dissect_lua(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree) { expert_add_info_format(pinfo, pi, PI_DEBUG, PI_ERROR ,"Lua Error"); } - clear_outstanding_Tvb(); - clear_outstanding_Pinfo(); - clear_outstanding_Column(); - clear_outstanding_Columns(); - clear_outstanding_TreeItem(); - + register_frame_end_routine(lua_frame_end); lua_pinfo = NULL; lua_tree = NULL; |