aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2021-11-30 01:04:07 -0500
committerJohn Thacker <johnthacker@gmail.com>2021-12-01 20:50:37 -0500
commitcf0ecc4fe155d0698c46bec82f11cabb26c3a878 (patch)
tree8a0b36d94013e7aa141faec0587d11783200bf90 /wiretap
parent261d223a30834bfaad4ce05dd65daad1a3ea8d4c (diff)
nstime: Support ISO 8601 basic format
Add support in iso8601_to_nstime for the ISO 8601 Basic date/time format that lacks the - and : separators.
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/eri_enb_log.c2
-rw-r--r--wiretap/nettrace_3gpp_32_423.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/eri_enb_log.c b/wiretap/eri_enb_log.c
index 5c44ffa9d6..8ab5269107 100644
--- a/wiretap/eri_enb_log.c
+++ b/wiretap/eri_enb_log.c
@@ -47,7 +47,7 @@ static gboolean eri_enb_log_get_packet(FILE_T fh, wtap_rec* rec,
length = length - 1;
}
- if (0 < iso8601_to_nstime(&packet_time, line+1)) {
+ if (0 < iso8601_to_nstime(&packet_time, line+1, ISO8601_DATETIME)) {
rec->ts.secs = packet_time.secs;
rec->ts.nsecs = packet_time.nsecs;
rec->presence_flags |= WTAP_HAS_TS;
diff --git a/wiretap/nettrace_3gpp_32_423.c b/wiretap/nettrace_3gpp_32_423.c
index 74c21cc9eb..235bfba2a2 100644
--- a/wiretap/nettrace_3gpp_32_423.c
+++ b/wiretap/nettrace_3gpp_32_423.c
@@ -807,7 +807,7 @@ nettrace_3gpp_32_423_file_open(wtap *wth, int *err, gchar **err_info)
/* Ok it's our file. From here we'll need to free memory */
file_info = g_new0(nettrace_3gpp_32_423_file_info_t, 1);
- curr_pos += iso8601_to_nstime(&file_info->start_time, curr_pos);
+ curr_pos += iso8601_to_nstime(&file_info->start_time, curr_pos, ISO8601_DATETIME);
file_info->start_offset = start_offset + (curr_pos - magic_buf);
file_info->buffer = g_byte_array_sized_new(RINGBUFFER_START_SIZE);
g_byte_array_append(file_info->buffer, curr_pos, (guint)(bytes_read - (curr_pos - magic_buf)));