forked from osmocom/wireshark
randpktdump: fix a crash.
Randpktdump requires the init the wtap opttypes. Fixed making the init function public and calling it. Bug: 12539 Change-Id: I02585c41012deacff1526b51ed09ab555cbfc8ce Reviewed-on: https://code.wireshark.org/review/15951 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
79aab9232b
commit
b5a8c4f729
|
@ -30,6 +30,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "wsutil/file_util.h"
|
||||
#include <wiretap/wtap_opttypes.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <wsutil/unicode-utils.h>
|
||||
|
@ -677,6 +678,8 @@ void randpkt_example_init(randpkt_example* example, char* produce_filename, int
|
|||
{
|
||||
int err;
|
||||
|
||||
wtap_opttypes_initialize();
|
||||
|
||||
if (strcmp(produce_filename, "-") == 0) {
|
||||
/* Write to the standard output. */
|
||||
example->dump = wtap_dump_open_stdout(WTAP_FILE_TYPE_SUBTYPE_PCAP,
|
||||
|
|
|
@ -180,7 +180,7 @@ typedef struct wtap_optblock_reg {
|
|||
* initialized yet. Should handle "registration" when code is
|
||||
* refactored to do so.
|
||||
*/
|
||||
void wtap_opttypes_initialize(void);
|
||||
WS_DLL_PUBLIC void wtap_opttypes_initialize(void);
|
||||
|
||||
/** Create an option block by type
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue