From 9bf40d4a6e507e10c8429a758ac190146caf48d6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 28 Dec 2017 20:58:38 -0800 Subject: Do the right check for "no name resolution information to save". The check that the pcapng code does is "do we have a non-null addrinfo_lists_t * and, if so, does it have a non-null ipv4_addr_list or ipv6_addr_list"? The check that the file-save code was using was just "do we have a non-null addrinfo_lists_t *", so sometimes it'd think we couldn't do a "quick save" even though we had no name resolution information to write out to the capture file. Make a routine that does that check, and use it in *both* places. Change-Id: Id4720f4fe4940354320b2b7621ca5e37e45ec1f3 Reviewed-on: https://code.wireshark.org/review/25055 Reviewed-by: Guy Harris --- wiretap/wtap.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'wiretap/wtap.h') diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 5c3fece007..dbbaf83667 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1932,6 +1932,8 @@ WS_DLL_PUBLIC void wtap_set_bytes_dumped(wtap_dumper *wdh, gint64 bytes_dumped); struct addrinfo; WS_DLL_PUBLIC +gboolean wtap_addrinfo_list_empty(addrinfo_lists_t *addrinfo_lists); +WS_DLL_PUBLIC gboolean wtap_dump_set_addrinfo_list(wtap_dumper *wdh, addrinfo_lists_t *addrinfo_lists); WS_DLL_PUBLIC gboolean wtap_dump_get_needs_reload(wtap_dumper *wdh); -- cgit v1.2.3