diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-20 17:56:21 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-22 08:06:47 +0000 |
commit | 66719c9b6a17f15848f4e7151b0f6cbf9d37f9ed (patch) | |
tree | ea028a6604dafbae2c94e14b515a728324237b3b /test/suite-wslua.sh | |
parent | 296bc0b2a9374bb4102fcec4fd0106421aa5e34a (diff) | |
download | wireshark-66719c9b6a17f15848f4e7151b0f6cbf9d37f9ed.tar.gz wireshark-66719c9b6a17f15848f4e7151b0f6cbf9d37f9ed.tar.bz2 wireshark-66719c9b6a17f15848f4e7151b0f6cbf9d37f9ed.zip |
Add way for Lua file reader to save state per file read/write ops
Lua can create a file reader/writer, to open new capture file
formats or write to new ones. To save local state, it can save
things in Lua itself; but since there can be multiple open files
at the same time (for example during a reload), the Lua script
won't know for which file and state its read/write functions are
being invoked for. To remedy this, and also provide a convenient
way to store such state, this commit adds the ability for a Lua
script to store a Lua table in the wtap/wtap_dumper's priv
data member, just like C-code-based reader/writers do.
Change-Id: Ifc9e0d5f0379accee56f2a04b6080238670fec52
Reviewed-on: https://code.wireshark.org/review/766
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'test/suite-wslua.sh')
-rwxr-xr-x | test/suite-wslua.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/suite-wslua.sh b/test/suite-wslua.sh index a3b14f8091..d6c2244746 100755 --- a/test/suite-wslua.sh +++ b/test/suite-wslua.sh @@ -102,6 +102,7 @@ wslua_step_file_test() { cat ./testin.txt cat ./testout.txt test_step_failed "subtest-3 reading the pcap file with Lua did not match internal" + return fi # Now generate a new capture file using the Lua writer. @@ -121,6 +122,7 @@ wslua_step_file_test() { echo cat ./testout.txt test_step_failed "subtest-5 creating a new pcap file using Lua did not match dhcp.cap" + return fi # Now read an acme sipmsg.log using the acme Lua reader, writing it out as pcapng. |