summaryrefslogtreecommitdiff
path: root/asn1
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-06-15 23:42:14 -0700
committerMichael Mann <mmann78@netscape.net>2014-06-16 17:26:25 +0000
commitde00c49bd84c853c9260f70cc5857c5a5ab6d3be (patch)
treed20495295746d9c1b0623b631931f538ee6d3581 /asn1
parentb71b68cd637de5501de9d5684c79b6c8b5b2dfd3 (diff)
downloadwireshark-de00c49bd84c853c9260f70cc5857c5a5ab6d3be.tar.gz
Convert a bunch of time_to_str functions to wmem
Change-Id: I24fe3cc4a3589dadc4528a77fe7ff13d06b1a983 Reviewed-on: https://code.wireshark.org/review/2245 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/goose/goose.cnf2
-rw-r--r--asn1/lte-rrc/lte-rrc.cnf12
-rw-r--r--asn1/mms/mms.cnf6
-rw-r--r--asn1/snmp/packet-snmp-template.c2
-rw-r--r--asn1/sv/sv.cnf2
5 files changed, 12 insertions, 12 deletions
diff --git a/asn1/goose/goose.cnf b/asn1/goose/goose.cnf
index 5117414e7d..4640b1f584 100644
--- a/asn1/goose/goose.cnf
+++ b/asn1/goose/goose.cnf
@@ -41,7 +41,7 @@ GOOSEpdu
ts.secs = seconds;
ts.nsecs = nanoseconds;
- ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE);
+ ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE);
if(hf_index >= 0)
{
diff --git a/asn1/lte-rrc/lte-rrc.cnf b/asn1/lte-rrc/lte-rrc.cnf
index 0defb3ce66..9068a07887 100644
--- a/asn1/lte-rrc/lte-rrc.cnf
+++ b/asn1/lte-rrc/lte-rrc.cnf
@@ -359,8 +359,8 @@ if(ue_cap_tvb){
bits = tvb_get_bits64(async_system_time_tvb, 0, 49, ENC_BIG_ENDIAN);
ts.secs = (time_t)((bits*8)/1228800) + 315964800; /* CDMA2000 epoch is 00:00:00 (midnight) UTC on 1980-01-06 */
ts.nsecs = (int)(((bits%153600)*8*1000000000)/1228800);
- proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, FALSE));
- proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, FALSE));
+ proto_tree_add_text(subtree, async_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_LOCAL, TRUE));
}
#.FN_BODY SystemTimeInfoCDMA2000/cdma-SystemTime/synchronousSystemTime VAL_PTR=&sync_system_time_tvb
@@ -376,8 +376,8 @@ if(ue_cap_tvb){
bits = tvb_get_bits64(sync_system_time_tvb, 0, 39, ENC_BIG_ENDIAN);
ts.secs = (time_t)(bits/100) + 315964800; /* CDMA2000 epoch is 00:00:00 (midnight) UTC on 1980-01-06 */
ts.nsecs = (int)(bits%100)*10000000;
- proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, FALSE));
- proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "CDMA time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, FALSE));
+ proto_tree_add_text(subtree, sync_system_time_tvb, 0, -1, "Local time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_LOCAL, TRUE));
}
#.FN_BODY CellInfoUTRA-FDD-r9/utra-BCCH-Container-r9 VAL_PTR = &utra_bcch_cont_tvb
@@ -688,9 +688,9 @@ SystemInformationBlockType16-r11/timeInfo-r11/timeInfoUTC-r11 TYPE = FT_UINT64
ts.secs = (time_t)(timeInfo/100)-2208988800U; /* epoch is 00:00:00 (midnight) UTC on 1900-01-01 */
ts.nsecs = (int)(timeInfo%100)*10000000;
proto_tree_add_text(subtree, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5,
- "UTC time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, FALSE));
+ "UTC time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, FALSE));
proto_tree_add_text(subtree, tvb, old_offset>>3, (old_offset&0x07) ? 6 : 5,
- "Local time: %s", abs_time_to_ep_str(&ts, ABSOLUTE_TIME_LOCAL, TRUE));
+ "Local time: %s", abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_LOCAL, TRUE));
#.FN_BODY RRCConnectionReject-r8-IEs/waitTime
%(DEFAULT_BODY)s
diff --git a/asn1/mms/mms.cnf b/asn1/mms/mms.cnf
index 2de0d7dd6a..387b9e5d8c 100644
--- a/asn1/mms/mms.cnf
+++ b/asn1/mms/mms.cnf
@@ -57,7 +57,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
if(len == 4)
{
milliseconds = tvb_get_ntohl(tvb, offset);
- ptime = time_msecs_to_ep_str(milliseconds);
+ ptime = time_msecs_to_str(wmem_packet_scope(), milliseconds);
if(hf_index >= 0)
{
@@ -77,7 +77,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
ts.secs = (days + 5113) * 86400 + milliseconds / 1000;
ts.nsecs = (milliseconds %% 1000) * 1000000U;
- ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE);
+ ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE);
if(hf_index >= 0)
{
proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
@@ -124,7 +124,7 @@ UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
ts.secs = seconds;
ts.nsecs = nanoseconds;
- ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE);
+ ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE);
if(hf_index >= 0)
{
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 5cb41cbfa1..7e2bfb9e5e 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -1225,7 +1225,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
ts.nsecs = 0;
proto_tree_add_time_format_value(tree, hf_snmp_engineid_time, tvb, offset+4, 4,
&ts, "%s",
- abs_time_secs_to_ep_str(seconds, ABSOLUTE_TIME_LOCAL, TRUE));
+ abs_time_secs_to_str(wmem_packet_scope(), seconds, ABSOLUTE_TIME_LOCAL, TRUE));
offset+=8;
len_remain=0;
}
diff --git a/asn1/sv/sv.cnf b/asn1/sv/sv.cnf
index cfcdc63fc3..e261d3cdf3 100644
--- a/asn1/sv/sv.cnf
+++ b/asn1/sv/sv.cnf
@@ -48,7 +48,7 @@ SampledValues
ts.secs = seconds;
ts.nsecs = nanoseconds;
- ptime = abs_time_to_ep_str(&ts, ABSOLUTE_TIME_UTC, TRUE);
+ ptime = abs_time_to_str(wmem_packet_scope(), &ts, ABSOLUTE_TIME_UTC, TRUE);
if(hf_index >= 0)
{