From 20795925ffb2f9687e960de8d6798e53482cb175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Fri, 3 Oct 2014 19:27:04 +0200 Subject: Update capture_opts in extcap_cleanup(). This fixes redundant extcap_pid handle close that could occur in capture_opts_del_iface() which resulted in unhandled exception on Windows. Change-Id: I06b680fcb65cd6fd854a25fb1b01248dce3251a1 Reviewed-on: https://code.wireshark.org/review/4447 Petri-Dish: Alexis La Goutte Reviewed-by: Roland Knall Reviewed-by: Pascal Quantin --- capture_opts.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'capture_opts.h') diff --git a/capture_opts.h b/capture_opts.h index ca87b18112..c730a7d4d7 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -206,6 +206,12 @@ typedef struct link_row_tag { gint dlt; } link_row; +#ifdef WIN32 +#define INVALID_EXTCAP_PID INVALID_HANDLE_VALUE +#else +#define INVALID_EXTCAP_PID (GPid)-1 +#endif + typedef struct interface_options_tag { gchar *name; /* the name of the interface provided to winpcap/libpcap to specify the interface */ gchar *descr; @@ -220,7 +226,7 @@ typedef struct interface_options_tag { gchar *extcap; gchar *extcap_fifo; GHashTable *extcap_args; - GPid extcap_pid; + GPid extcap_pid; /* pid of running process or INVALID_EXTCAP_PID */ guint extcap_child_watch; #endif #if defined(_WIN32) || defined(HAVE_PCAP_CREATE) -- cgit v1.2.1