Wireshark-commits: [Wireshark-commits] master-2.2 0d52587: Lua: allow creating TVBs after calling o

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 15 Oct 2016 01:07:40 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0d52587bb2e03f93cd7bbb591a2cb27f094a1709
Submitter: Jeff Morriss (jeff.morriss.ws@xxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

0d52587 by Jeff Morriss (jeff.morriss.ws@xxxxxxxxx):

    Lua: allow creating TVBs after calling other (Lua) dissectors.
    
    Don't set `lua_tvb` (or any of the other global variables) to NULL after a
    Lua dissector is called: it's possible that the caller is also a Lua dissector
    which may want/need that (global) variable to still be set (to the value it
    had before the sub-dissector was called).
    
    This fixes the problem reported in:
    https://ask.wireshark.org/questions/56110/lua-error-tvbs-can-only-be-created-and-used-in-dissectors
    
    Making these variables not be a globals (as suggested at the top of
    init_wslua.c) might be a better solution--for another day.
    
    Change-Id: I14fb8ec35b62abeda3f3471a323b88c80537a06e
    Reviewed-on: https://code.wireshark.org/review/18095
    Petri-Dish: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Peter Wu <peter@xxxxxxxxxxxxx>
    (cherry picked from commit 38682523f9ce3ed378c782a848ba1ba5a6fe430f)
    Reviewed-on: https://code.wireshark.org/review/18204
    Reviewed-by: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
    

Actions performed:

    from  3e23931   CMakeLists: Add man files
    adds  0d52587   Lua: allow creating TVBs after calling other (Lua) dissectors.


Summary of changes:
 epan/wslua/init_wslua.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)