Get rid of remaining Booleans-as-encoding-arguments in
authorGuy Harris <guy@alum.mit.edu>
Fri, 11 May 2012 07:10:43 +0000 (07:10 -0000)
committerGuy Harris <guy@alum.mit.edu>
Fri, 11 May 2012 07:10:43 +0000 (07:10 -0000)
proto_tree_add_item() calls.

svn path=/trunk/; revision=42560

epan/dissectors/packet-tnef.c

index e0308cf9e0ba1fa42e8034fbb1f0f57f92a56af7..8fa82310c900553f08d84fc5ab370c3aff2aa757 100644 (file)
@@ -244,7 +244,7 @@ static const value_string tnef_Attribute_vals[] = {
        { 0, NULL }
 };
 
-static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id,  packet_info *pinfo _U_, proto_tree *tree, gboolean single, gboolean unicode)
+static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id,  packet_info *pinfo _U_, proto_tree *tree, gboolean single, gboolean unicode, guint encoding)
 {
         proto_item *item;
         guint32 length, count, i;
@@ -274,7 +274,7 @@ static gint dissect_counted_values(tvbuff_t *tvb, gint offset, int hf_id,  packe
                         char *unicode_str = tvb_get_ephemeral_unicode_string(tvb, offset, length, ENC_LITTLE_ENDIAN);
                         proto_tree_add_string(tree, hf_id, tvb, offset, length, unicode_str);
                 } else {
-                        proto_tree_add_item(tree, hf_id, tvb, offset, length, FALSE);
+                        proto_tree_add_item(tree, hf_id, tvb, offset, length, encoding);
                 }
                 offset += length;
 
@@ -438,13 +438,15 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
                                offset = PIDL_dissect_uint16(tvb, offset, pinfo, prop_tree, drep, hf_tnef_PropValue_b, 0);
                                break;
                        case PT_STRING8:
-                               offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_lpszA, pinfo, prop_tree, TRUE, FALSE);
+                               /* XXX - code page? */
+                               offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_lpszA, pinfo, prop_tree, TRUE, FALSE, ENC_ASCII|ENC_NA);
                                break;
                        case PT_BINARY:
-                               offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_bin, pinfo, prop_tree, TRUE, FALSE);
+                               offset = dissect_counted_values(tvb, offset, hf_tnef_PropValue_bin, pinfo, prop_tree, TRUE, FALSE, ENC_NA);
                                break;
                        case PT_UNICODE:
-                               offset = dissect_counted_values (tvb, offset, hf_tnef_PropValue_lpszW, pinfo, prop_tree, TRUE, TRUE);
+                               /* XXX - UCS-2 and UTF-16 need ENC_ values */
+                               offset = dissect_counted_values (tvb, offset, hf_tnef_PropValue_lpszW, pinfo, prop_tree, TRUE, TRUE, ENC_NA);
                                break;
                        case PT_CLSID:
                                offset = nspi_dissect_struct_MAPIUID(tvb, offset, pinfo, prop_tree, drep, hf_tnef_PropValue_lpguid, 0);