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:
Peter Wu 2018-03-23 18:05:13 +01:00 committed by Alexis La Goutte
parent cf5f77aca2
commit e804376612
1 changed files with 4 additions and 1 deletions

View File

@ -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