diff options
author | Joakim Karlsson <oakimk@gmail.com> | 2018-02-26 23:19:06 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-02-27 08:59:39 +0000 |
commit | c4521c24f6bfb727d0ff77506cc926b3f9d98e06 (patch) | |
tree | 76a78fe16acd34d5f8eec1b73795b9dae0ad62f3 | |
parent | 7dc9392deaee381b0b3e9c7855a68b0caf54d1cb (diff) |
[PFCP] fixed Graceful Release Period IE
* If stopped there is no time to show
* Default shall be multiple of 1 min
Change-Id: I68c170501923e689c1e18f40fed8e134ff4e7d69
Reviewed-on: https://code.wireshark.org/review/26126
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-pfcp.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/epan/dissectors/packet-pfcp.c b/epan/dissectors/packet-pfcp.c index 672a5db6d9..3829f5f8de 100644 --- a/epan/dissectors/packet-pfcp.c +++ b/epan/dissectors/packet-pfcp.c @@ -3054,33 +3054,33 @@ dissect_pfcp_graceful_release_period(tvbuff_t *tvb, packet_info *pinfo _U_, prot proto_tree_add_item_ret_uint(tree, hf_pfcp_timer_value, tvb, offset, 1, ENC_BIG_ENDIAN, &value); offset++; - unit = unit >> 5; - switch (unit) { - case 0: - proto_item_append_text(item, "%u s", value * 2); - break; - case 1: - proto_item_append_text(item, "%u min", value); - break; - case 2: - proto_item_append_text(item, "%u min", value * 10); - break; - case 3: - proto_item_append_text(item, "%u hours", value); - break; - case 4: - proto_item_append_text(item, "%u hours", value * 10); - break; - case 7: - proto_item_append_text(item, "%u Infinite", value); - break; - /* Value 5 and 6 */ - default: - proto_item_append_text(item, "%u min", value * 10); - break; - } - if ((unit != 7) && (value == 0)) { + if ((unit == 0) && (value == 0)) { proto_item_append_text(item, " Stopped"); + } else { + switch (unit) { + case 0: + proto_item_append_text(item, "%u s", value * 2); + break; + case 1: + proto_item_append_text(item, "%u min", value); + break; + case 2: + proto_item_append_text(item, "%u min", value * 10); + break; + case 3: + proto_item_append_text(item, "%u hours", value); + break; + case 4: + proto_item_append_text(item, "%u hours", value * 10); + break; + case 7: + proto_item_append_text(item, "%u Infinite", value); + break; + /* Value 5 and 6 */ + default: + proto_item_append_text(item, "%u min", value * 1); + break; + } } if (offset < length) { |