From e80437661246638ece4037221196069db9249a93 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 23 Mar 2018 18:05:13 +0100 Subject: [PATCH] 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 Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte --- docbook/wsluarm.asciidoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docbook/wsluarm.asciidoc b/docbook/wsluarm.asciidoc index d7c559a561..ab3c96bf88 100644 --- a/docbook/wsluarm.asciidoc +++ b/docbook/wsluarm.asciidoc @@ -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