forked from osmocom/wireshark
WSP: fix addition of X-Wap-Tod header in tree
Bug: 13546 Change-Id: Ie1e78cc7ada338b17a21a32714fed4816724a4f8 Reviewed-on: https://code.wireshark.org/review/20850 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
a68cb9e90f
commit
cf7979c657
|
@ -2388,7 +2388,6 @@ wkh_tod_value_header_func(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, pa
|
|||
{
|
||||
wkh_0a_Declarations;
|
||||
guint32 val = 0, off = val_start, len;
|
||||
gchar *str; /* may not be freed! */
|
||||
proto_item *ti = NULL;
|
||||
gchar* header_name = wmem_strdup_printf(wmem_packet_scope(), "Time of Day: %s", name);
|
||||
|
||||
|
@ -2410,14 +2409,16 @@ wkh_tod_value_header_func(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, pa
|
|||
if (val_id <= 4) { /* Length field already parsed by macro! */
|
||||
get_date_value(val, tvb, off, len, ok);
|
||||
if (ok) {
|
||||
nstime_t t;
|
||||
t.secs = (time_t)val;
|
||||
t.nsecs = 0;
|
||||
if (val == 0) {
|
||||
proto_tree_add_string(tree, hf,
|
||||
tvb, hdr_start, offset - hdr_start,
|
||||
proto_tree_add_time_format_value(tree, hf,
|
||||
tvb, hdr_start, offset - hdr_start, &t,
|
||||
"Requesting Time Of Day");
|
||||
} else {
|
||||
str = abs_time_secs_to_str(wmem_packet_scope(), val, ABSOLUTE_TIME_LOCAL, TRUE);
|
||||
proto_tree_add_string(tree, hf,
|
||||
tvb, hdr_start, offset - hdr_start, str);
|
||||
proto_tree_add_time(tree, hf,
|
||||
tvb, hdr_start, offset - hdr_start, &t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue