For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
[obnox/wireshark/wip.git] / epan / dissectors / packet-mmse.c
index 82f1eca7bd5902171a11611d4fc7107712218778..ea65607f12896b02dc1fddf5498dd669731697e5 100644 (file)
@@ -728,7 +728,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
     if (tree) {
        DebugLog(("tree != NULL\n"));
 
-       ti = proto_tree_add_item(tree, proto_mmse, tvb, 0, -1, FALSE);
+       ti = proto_tree_add_item(tree, proto_mmse, tvb, 0, -1, ENC_NA);
        proto_item_append_text(ti, ", Type: %s", message_type);
        /* create display subtree for the protocol */
        mmse_tree = proto_item_add_subtree(ti, ett_mmse);
@@ -1165,7 +1165,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
                    if (tree) {
                        guint32 fwd_count, count1, count2;
                        proto_tree *subtree = NULL;
-                       proto_item *ti = NULL;
+                       proto_item *tii = NULL;
                        /* 1. Forwarded-count-value := Integer-value */
                        fwd_count = get_integer_value(tvb, offset + count,
                            &count1);
@@ -1173,13 +1173,13 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
                        count2 = get_encoded_strval(tvb,
                                offset + count + count1, &strval);
                        /* Now render the fields */
-                       ti = proto_tree_add_string_format(mmse_tree,
+                       tii = proto_tree_add_string_format(mmse_tree,
                                hf_mmse_prev_sent_by,
                                tvb, offset - 1, 1 + count + length,
                                strval, "%s (Forwarded-count=%u)",
                                format_text(strval, strlen(strval)),
                                fwd_count);
-                       subtree = proto_item_add_subtree(ti,
+                       subtree = proto_item_add_subtree(tii,
                                ett_mmse_hdr_details);
                        proto_tree_add_uint(subtree,
                                hf_mmse_prev_sent_by_fwd_count,
@@ -1198,7 +1198,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
                        guint            tval;
                        nstime_t         tmptime;
                        proto_tree *subtree = NULL;
-                       proto_item *ti = NULL;
+                       proto_item *tii = NULL;
                        /* 1. Forwarded-count-value := Integer-value */
                        fwd_count = get_integer_value(tvb, offset + count,
                            &count1);
@@ -1207,16 +1207,17 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
                                &count2);
                        tmptime.secs = tval;
                        tmptime.nsecs = 0;
-                       strval = abs_time_to_str(&tmptime, FALSE);
+                       strval = abs_time_to_str(&tmptime, ABSOLUTE_TIME_LOCAL,
+                           TRUE);
                        /* Now render the fields */
                        tvb_ensure_bytes_exist(tvb, offset - 1, length + count + 1);
-                       ti = proto_tree_add_string_format(mmse_tree,
+                       tii = proto_tree_add_string_format(mmse_tree,
                                hf_mmse_prev_sent_date,
                                tvb, offset - 1, 1 + count + length,
                                strval, "%s (Forwarded-count=%u)",
                                format_text(strval, strlen(strval)),
                                fwd_count);
-                       subtree = proto_item_add_subtree(ti,
+                       subtree = proto_item_add_subtree(tii,
                                ett_mmse_hdr_details);
                        proto_tree_add_uint(subtree,
                                hf_mmse_prev_sent_date_fwd_count,
@@ -1286,8 +1287,8 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
                            proto_tree_add_string_format(mmse_tree,
                                    hf_mmse_ffheader, tvb, offset,
                                    length + length2,
-                                   (const char *) tvb_get_ptr(
-                                           tvb, offset, length + length2),
+                                   tvb_get_ephemeral_string(tvb, offset,
+                                           length + length2),
                                    "%s: %s",
                                    format_text(strval, strlen(strval)),
                                    format_text(strval2, strlen(strval2)));
@@ -1380,7 +1381,7 @@ proto_register_mmse(void)
        },
        {   &hf_mmse_date,
            {   "Date", "mmse.date",
-               FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x00,
+               FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
                "Arrival timestamp of the message or sending timestamp.",
                HFILL
            }
@@ -1394,7 +1395,7 @@ proto_register_mmse(void)
        },
        {   &hf_mmse_delivery_time_abs,
            {   "X-Mms-Delivery-Time", "mmse.delivery_time.abs",
-               FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x00,
+               FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
                "The time at which message delivery is desired.",
                HFILL
            }
@@ -1408,7 +1409,7 @@ proto_register_mmse(void)
        },
        {   &hf_mmse_expiry_abs,
            {   "X-Mms-Expiry", "mmse.expiry.abs",
-               FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x00,
+               FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
                "Time when message expires and need not be delivered anymore.",
                HFILL
            }
@@ -1570,7 +1571,7 @@ proto_register_mmse(void)
        },
        {   &hf_mmse_reply_charging_deadline_abs,
            {   "X-Mms-Reply-Charging-Deadline", "mmse.reply_charging_deadline.abs",
-               FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x00,
+               FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x00,
                "The latest time of the recipient(s) to submit the Reply MM.",
                HFILL
            }