forked from osmocom/wireshark
docs: improve Lua Listener example
Ensure the dialog is populated when the dialog is opened after a capture file has already been loaded. Change-Id: I9ba1b4a1eb7a8b21ce7dac4a820eadf10daa9845 Reviewed-on: https://code.wireshark.org/review/26601 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
parent
cf5f77aca2
commit
e804376612
|
@ -127,7 +127,7 @@ local function menuable_tap()
|
|||
-- this is our tap
|
||||
local tap = Listener.new();
|
||||
|
||||
function remove()
|
||||
local function remove()
|
||||
-- this way we remove the listener that otherwise will remain running indefinitely
|
||||
tap:remove();
|
||||
end
|
||||
|
@ -158,6 +158,9 @@ local function menuable_tap()
|
|||
tw:clear()
|
||||
ips = {}
|
||||
end
|
||||
|
||||
-- Ensure that all existing packets are processed.
|
||||
retap_packets()
|
||||
end
|
||||
|
||||
-- using this function we register our function
|
||||
|
|
Loading…
Reference in New Issue