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 /randpkt_core/randpkt_core.c | |
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 'randpkt_core/randpkt_core.c')
-rw-r--r-- | randpkt_core/randpkt_core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/randpkt_core/randpkt_core.c b/randpkt_core/randpkt_core.c index 738395fbd1..aef4d29326 100644 --- a/randpkt_core/randpkt_core.c +++ b/randpkt_core/randpkt_core.c @@ -654,20 +654,24 @@ gboolean randpkt_example_close(randpkt_example* example) int randpkt_example_init(randpkt_example* example, char* produce_filename, int produce_max_bytes) { + wtapng_dump_params params; int err; if (pkt_rand == NULL) { pkt_rand = g_rand_new(); } + wtap_dump_params_init(¶ms, NULL); if (strcmp(produce_filename, "-") == 0) { /* Write to the standard output. */ example->dump = wtap_dump_open_stdout(WTAP_FILE_TYPE_SUBTYPE_PCAP, - example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err); + example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, + ¶ms, &err); example->filename = "the standard output"; } else { example->dump = wtap_dump_open(produce_filename, WTAP_FILE_TYPE_SUBTYPE_PCAP, - example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, &err); + example->sample_wtap_encap, produce_max_bytes, FALSE /* compressed */, + ¶ms, &err); example->filename = produce_filename; } if (!example->dump) { |