aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/pcapng.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-09-27 01:21:10 +0200
committerMichael Mann <mmann78@netscape.net>2014-09-27 12:13:06 +0000
commita3c4133847d192eba55697caa230f3a5cc14ab4b (patch)
treeac4082653552d07975d9b5f178ca200a3c7c5568 /wiretap/pcapng.c
parent7477a46f92cc419493d62f22caf22dd357aab814 (diff)
tshark: fix -H option
The dump of the address info list must be differed to the end of the processing so as to know which host name was actually used in the capture Bug: 10507 Change-Id: I44dbfae918d4ae92f9740c309804c7ff21bb4e1b Reviewed-on: https://code.wireshark.org/review/4327 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'wiretap/pcapng.c')
-rw-r--r--wiretap/pcapng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index 9e829eed0f..db8fe49118 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -3632,9 +3632,6 @@ static gboolean pcapng_dump(wtap_dumper *wdh,
phdr->pkt_encap,
wtap_encap_string(phdr->pkt_encap));
- /* Flush any hostname resolution info we may have */
- pcapng_write_name_resolution_block(wdh, err);
-
switch (phdr->rec_type) {
case REC_TYPE_PACKET:
@@ -3680,6 +3677,9 @@ static gboolean pcapng_dump_close(wtap_dumper *wdh, int *err _U_)
{
guint i, j;
+ /* Flush any hostname resolution info we may have */
+ pcapng_write_name_resolution_block(wdh, err);
+
for (i = 0; i < wdh->interface_data->len; i++) {
/* Get the interface description */