diff options
author | Joakim Karlsson <oakimk@gmail.com> | 2018-02-22 23:48:55 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-02-23 05:51:50 +0000 |
commit | 4d3b39938d88c782bd146da59866df89aaf9b80f (patch) | |
tree | 417d9d43aa4a18cf0cd0ab07c9b37c6616e56c09 | |
parent | 017167fb34220a17af361d50b2d239927acac7c1 (diff) |
[PFCP] fixed DL Buffering Duration
* If stopped there is no time to show
* Default shall be multiple of 1 min
Change-Id: Id9c489688abc30f28a6fb4efbde263409ae92873
Reviewed-on: https://code.wireshark.org/review/26022
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-pfcp.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/epan/dissectors/packet-pfcp.c b/epan/dissectors/packet-pfcp.c index dd9ab48737..4d299c2eff 100644 --- a/epan/dissectors/packet-pfcp.c +++ b/epan/dissectors/packet-pfcp.c @@ -1486,32 +1486,33 @@ dissect_pfcp_dl_buffering_dur(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree 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); + break; + } } if (offset < length) { |