From ab07f8e0f89eb1bb2c2c61c71e44e3fd0e31cc52 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 4 Dec 2016 13:42:07 -0800 Subject: Have a routine to do all the work of initializing libwiretap. Have programs that use libwiretap call that routine rather than separately calling some or all of init_open_routines(), wtap_register_plugin_types(), and wtap_opttypes_initialize(). Also don't have routines internal to libwiretap call those. Yes, this means doing some initialization work when it isn't necessary, but scattering on-demand calls throughout the code is a great way to forget to make those calls. Change-Id: I5828e1c5591c9d94fbb3eb0a0e54591e8fc61710 Reviewed-on: https://code.wireshark.org/review/19069 Reviewed-by: Guy Harris --- randpkt_core/randpkt_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'randpkt_core') diff --git a/randpkt_core/randpkt_core.c b/randpkt_core/randpkt_core.c index 44a54f1ad7..e84cb39d3c 100644 --- a/randpkt_core/randpkt_core.c +++ b/randpkt_core/randpkt_core.c @@ -704,7 +704,7 @@ void randpkt_example_init(randpkt_example* example, char* produce_filename, int pkt_rand = g_rand_new(); } - wtap_opttypes_initialize(); + wtap_init(); if (strcmp(produce_filename, "-") == 0) { /* Write to the standard output. */ -- cgit v1.2.1