diff options
author | Tomasz Moń <desowin@gmail.com> | 2014-10-03 19:27:04 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2014-10-04 11:17:01 +0000 |
commit | 20795925ffb2f9687e960de8d6798e53482cb175 (patch) | |
tree | e0b06742bd352a49fa37921cbc3e42df3c497bf1 /capture_opts.h | |
parent | 06926aed88eaf2d17b589beb999b079366c22380 (diff) |
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 <alexis.lagoutte@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'capture_opts.h')
-rw-r--r-- | capture_opts.h | 8 |
1 files changed, 7 insertions, 1 deletions
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) |