summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-wsp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-05-21 06:33:25 +0000
committerGuy Harris <guy@alum.mit.edu>2010-05-21 06:33:25 +0000
commit927b7da34668bc9c0b2dd4c339e45278fd109c77 (patch)
tree7017587d5ae078490ee9b3be8ec6551e7df71d13 /epan/dissectors/packet-wsp.c
parent4dcaf67f37f89d699a42089001f04c5daf9558e2 (diff)
downloadwireshark-927b7da34668bc9c0b2dd4c339e45278fd109c77.tar.gz
Have abs_time_to_str() and abs_time_to_str_secs() take an additional
argument indicating whether to include the time zone in the string. If we're constructing a display filter, don't include the time zone, otherwise do. Fixes bug 4756. svn path=/trunk/; revision=32913
Diffstat (limited to 'epan/dissectors/packet-wsp.c')
-rw-r--r--epan/dissectors/packet-wsp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c
index 25a1596bdc..5960a57732 100644
--- a/epan/dissectors/packet-wsp.c
+++ b/epan/dissectors/packet-wsp.c
@@ -1797,7 +1797,7 @@ add_headers (proto_tree *tree, tvbuff_t *tvb, int hf, packet_info *pinfo)
tvb, hdr_start, hdr_len + val_len,
"Requesting Time Of Day");
} else {
- val_str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL);
+ val_str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE);
ti = proto_tree_add_string (wsp_headers,
hf_hdr_x_wap_tod,
tvb, hdr_start, hdr_len + val_len, val_str);
@@ -2832,7 +2832,7 @@ wkh_ ## underscored(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i
if (val_id <= 4) { /* Length field already parsed by macro! */ \
get_date_value(val, tvb, off, len, ok); \
if (ok) { \
- str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL); \
+ str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \
tvb_ensure_bytes_exist(tvb, hdr_start, offset - hdr_start); \
ti = proto_tree_add_string(tree, hf_hdr_ ## underscored, \
tvb, hdr_start, offset - hdr_start, str); \
@@ -2867,7 +2867,7 @@ wkh_ ## underscored(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i
if (val_id <= 4) { /* Length field already parsed by macro! */ \
get_date_value(val, tvb, off, len, ok); \
if (ok) { \
- str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL); \
+ str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \
tvb_ensure_bytes_exist(tvb, hdr_start, offset - hdr_start); \
ti = proto_tree_add_string(tree, hf_hdr_ ## underscored, \
tvb, hdr_start, offset - hdr_start, str); \
@@ -2920,7 +2920,7 @@ wkh_ ## underscored(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i
tvb, hdr_start, offset - hdr_start, \
"Requesting Time Of Day"); \
} else { \
- str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL); \
+ str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE); \
tvb_ensure_bytes_exist(tvb, hdr_start, offset - hdr_start); \
ti = proto_tree_add_string(tree, hf_hdr_ ## underscored, \
tvb, hdr_start, offset - hdr_start, str); \
@@ -3590,7 +3590,7 @@ wkh_profile_warning(proto_tree *tree, tvbuff_t *tvb, guint32 hdr_start, packet_i
get_date_value(val, tvb, off, len, ok);
if (ok) { /* Valid warn-text string */
off += len;
- val_str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL);
+ val_str = abs_time_secs_to_str(val, ABSOLUTE_TIME_LOCAL, TRUE);
str = g_strdup_printf("; date=%s", val_str);
proto_item_append_string(ti, str);
g_free(str); /* proto_XXX creates a copy */