aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/nettrace_3gpp_32_423.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2019-05-17 12:12:53 +0200
committerAnders Broman <a.broman58@gmail.com>2019-05-17 10:43:01 +0000
commit075fc13d7a94a9a40e8970825dc52ac9f2f22dc5 (patch)
tree0f7c9fbe3518e11edd3ab3b748e973681ff40cce /wiretap/nettrace_3gpp_32_423.c
parent0215d34be76628a84fcebcb468a42f0ea88aaec0 (diff)
3gpp_32_423: Fix dissection of changeTime.
Change-Id: I8d86f92a918044763a02d0ba9856ea97c3937bf1 Reviewed-on: https://code.wireshark.org/review/33240 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/nettrace_3gpp_32_423.c')
-rw-r--r--wiretap/nettrace_3gpp_32_423.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/wiretap/nettrace_3gpp_32_423.c b/wiretap/nettrace_3gpp_32_423.c
index c5ed37b99e..f554f67a38 100644
--- a/wiretap/nettrace_3gpp_32_423.c
+++ b/wiretap/nettrace_3gpp_32_423.c
@@ -1055,6 +1055,21 @@ create_temp_pcapng_file(wtap *wth, int *err, gchar **err_info, nettrace_3gpp_32_
*/
prev_pos = curr_pos;
ms = 0;
+ curr_pos = strstr(curr_pos, "changeTime");
+ /* Check if we have the tag or if we pased the end of the current message */
+ if ((curr_pos) && (curr_pos < next_msg_pos)) {
+ curr_pos = curr_pos + 12;
+ scan_found = sscanf(curr_pos, "%u.%u", &second, &ms);
+
+ if ((scan_found == 2) && (start_time.secs != 0)) {
+ start_time.secs = start_time.secs + second;
+ start_time.nsecs = start_time.nsecs + (ms * 1000000);
+ }
+ }
+ else {
+ curr_pos = prev_pos;
+ }
+
/* See if we have a "name" */
curr_pos = strstr(curr_pos, "name=");
if ((curr_pos) && (curr_pos < next_msg_pos)) {
@@ -1075,19 +1090,6 @@ create_temp_pcapng_file(wtap *wth, int *err, gchar **err_info, nettrace_3gpp_32_
else {
curr_pos = prev_pos;
}
- curr_pos = strstr(curr_pos, "changeTime");
- /* Check if we have the tag or if we pased the end of the current message */
- if ((curr_pos)&&(curr_pos < next_msg_pos)){
- curr_pos = curr_pos + 12;
- scan_found = sscanf(curr_pos, "%u.%u",&second, &ms);
-
- if ((scan_found == 2) && (start_time.secs != 0)) {
- start_time.secs = start_time.secs + second;
- start_time.nsecs = start_time.nsecs + (ms * 1000000);
- }
- } else {
- curr_pos = prev_pos;
- }
/* Check if we have "<initiator>"
* It might contain an address
*/