[PFCP] fixed Timer IE
* If stopped there is no time to show * Default shall be multiple of 1 min Change-Id: Ib42c19f536ee0af5d8f83cceb8f84ad3b3a2f36c Reviewed-on: https://code.wireshark.org/review/26047 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
38425dd78d
commit
24ba73ccf0
|
@ -1624,32 +1624,33 @@ dissect_pfcp_timer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, prot
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue