aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-07-28 13:25:38 -0700
committerAnders Broman <a.broman58@gmail.com>2020-07-29 13:49:09 +0000
commitc68d36b173b3bafd007e2d14461dfb0f194e0bde (patch)
treefd2c674da5d5e2ad67ad906eaf2c6e7efcc2fa00 /ui
parentf8efccc3cc1e8d604a4fd085ab9a0f0174e9b25f (diff)
wiretap: have the file's time stamp resolution be a dump parameter.
Add a tsprec value to the wtap_dump_params structure, giving the per-file time stamp precision. In wtap_dump_init_dumper(), when constructing a dummy IDB for files that don't have one, fill in the tsprecision and time_units_per_second values based on the tsprec value in the wtap_dump_params structure. Change-Id: I3708b144d4d0ac0dfbe32bd1c16768a75c942141 Reviewed-on: https://code.wireshark.org/review/37979 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/import_text_dialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/import_text_dialog.cpp b/ui/qt/import_text_dialog.cpp
index 7018e609e8..579d8aedb4 100644
--- a/ui/qt/import_text_dialog.cpp
+++ b/ui/qt/import_text_dialog.cpp
@@ -124,6 +124,7 @@ void ImportTextDialog::convertTextFile() {
wtap_dump_params_init(&params, NULL);
params.encap = import_info_.encapsulation;
params.snaplen = import_info_.max_frame_length;
+ params.tsprec = WTAP_TSPREC_USEC; /* XXX - support other precisions? */
/* Use a random name for the temporary import buffer */
import_info_.wdh = wtap_dump_open_tempfile(&tmpname, "import", WTAP_FILE_TYPE_SUBTYPE_PCAPNG, WTAP_UNCOMPRESSED, &params, &err);
capfile_name_.append(tmpname ? tmpname : "temporary file");