diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-11-12 15:43:10 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-11-13 03:37:29 +0000 |
commit | 3faa45d4ec9214fbe4b15c3b6d9bc875f8fb780c (patch) | |
tree | 98cc11031a83c66e6bbbd22ebe6c3581ca9392be /epan | |
parent | f070ad2c1eb2813be5d7e27b1e1bb7b844d8467e (diff) |
Don't have _ng versions of the dumper open routines.
Have the routines always take a parameters pointer; pass either null or
a pointer to an initialized-to-nothing structure in cases where we were
calling the non-_ng versions.
Change-Id: I23b779d87f3fbd29306ebe1df568852be113d3b2
Reviewed-on: https://code.wireshark.org/review/30590
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-snort.c | 3 | ||||
-rw-r--r-- | epan/wslua/wslua_dumper.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/epan/dissectors/packet-snort.c b/epan/dissectors/packet-snort.c index decf4ba385..9e1d2ad88d 100644 --- a/epan/dissectors/packet-snort.c +++ b/epan/dissectors/packet-snort.c @@ -1144,6 +1144,7 @@ snort_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data else { /* We expect alerts from Snort. Pass frame into snort on first pass. */ if (!pinfo->fd->flags.visited && current_session.working) { + wtapng_dump_params params; int write_err = 0; gchar *err_info; wtap_rec rec; @@ -1163,11 +1164,13 @@ snort_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data * versions of Snort" wouldn't handle multiple encapsulation * types. */ + wtap_dump_params_init(¶ms, NULL); current_session.pdh = wtap_dump_fdopen(current_session.in, WTAP_FILE_TYPE_SUBTYPE_PCAP, pinfo->rec->rec_header.packet_header.pkt_encap, WTAP_MAX_PACKET_SIZE_STANDARD, FALSE, /* compressed */ + ¶ms, &open_err); if (!current_session.pdh) { current_session.working = FALSE; diff --git a/epan/wslua/wslua_dumper.c b/epan/wslua/wslua_dumper.c index eb02e1d550..ae947de796 100644 --- a/epan/wslua/wslua_dumper.c +++ b/epan/wslua/wslua_dumper.c @@ -205,8 +205,10 @@ WSLUA_CONSTRUCTOR Dumper_new(lua_State* L) { int encap = (int)luaL_optinteger(L,WSLUA_OPTARG_Dumper_new_ENCAP,WTAP_ENCAP_ETHERNET); int err = 0; const char* filename = cross_plat_fname(fname); + wtapng_dump_params params; - d = wtap_dump_open(filename, filetype, encap, 0, FALSE, &err); + wtap_dump_params_init(¶ms, NULL); + d = wtap_dump_open(filename, filetype, encap, 0, FALSE, ¶ms, &err); if (! d ) { /* WSLUA_ERROR("Error while opening file for writing"); */ @@ -357,6 +359,7 @@ WSLUA_METHOD Dumper_new_for_current(lua_State* L) { int encap; int err = 0; const char* filename = cross_plat_fname(fname); + wtapng_dump_params params; if (! lua_pinfo ) { WSLUA_ERROR(Dumper_new_for_current,"Cannot be used outside a tap or a dissector"); @@ -369,7 +372,8 @@ WSLUA_METHOD Dumper_new_for_current(lua_State* L) { encap = lua_pinfo->rec->rec_header.packet_header.pkt_encap; - d = wtap_dump_open(filename, filetype, encap, 0, FALSE, &err); + wtap_dump_params_init(¶ms, NULL); + d = wtap_dump_open(filename, filetype, encap, 0, FALSE, ¶ms, &err); if (! d ) { switch (err) { |