--- packet-wsp.c.1.57	Sun Jun 16 01:23:31 2002
+++ packet-wsp.c	Tue Aug  6 21:39:55 2002
@@ -205,6 +205,7 @@
 static gint ett_header_cache_control_parameters		= ETT_EMPTY;
 static gint ett_header_cache_control_field_names	= ETT_EMPTY;
 static gint ett_capabilities				= ETT_EMPTY;
+static gint ett_post					= ETT_EMPTY;
 static gint ett_content_type				= ETT_EMPTY;
 static gint ett_redirect_flags				= ETT_EMPTY;
 static gint ett_redirect_afl				= ETT_EMPTY;
@@ -956,8 +957,8 @@
 static int add_constrained_encoding (proto_tree *, tvbuff_t *, int, int);
 static int add_parameter_type (proto_tree *, tvbuff_t *, int, int);
 static int add_parameter_text (proto_tree *, tvbuff_t *, int, int, int, const char *);
-static void add_post_data (proto_tree *, tvbuff_t *, guint, const char *);
 static void add_post_variable (proto_tree *, tvbuff_t *, guint, guint, guint, guint);
+static void add_multipart_data (proto_tree *, tvbuff_t *);
 static void add_pragma_header (proto_tree *, tvbuff_t *, int, tvbuff_t *,
     value_type_t, int);
 static void add_transfer_encoding_header (proto_tree *, tvbuff_t *, int,
@@ -1355,8 +1356,7 @@
 				/* Runs from start of headers+headerLength to end of frame */
 				offset = nextOffset+headerLength;
 				tmp_tvb = tvb_new_subset (tvb, offset, tvb_reported_length (tvb)-offset, tvb_reported_length (tvb)-offset);
-				add_post_data (wsp_tree, tmp_tvb,
-				    contentType, contentTypeStr);
+				add_post_data (wsp_tree, tmp_tvb, contentType, contentTypeStr);
 			}
 			if (tvb_reported_length_remaining(tvb, headerStart + count + uriLength + headersLength) > 0)
 			{
@@ -3798,7 +3798,7 @@
 	return offset;
 }
 
-static void
+void
 add_post_data (proto_tree *tree, tvbuff_t *tvb, guint contentType,
     const char *contentTypeStr)
 {
@@ -3809,9 +3809,11 @@
 	guint valueEnd = 0;
 	guint8 peek = 0;
 	proto_item *ti;
+	proto_tree *sub_tree;
 	
 	/* VERIFY ti = proto_tree_add_item (tree, hf_wsp_post_data,tvb,offset,-1,bo_little_endian); */
 	ti = proto_tree_add_item (tree, hf_wsp_post_data,tvb,offset,-1,bo_little_endian);
+	sub_tree = proto_item_add_subtree(ti, ett_post);
 
 	if (contentTypeStr == NULL && contentType == 0x12)
 	{
@@ -3831,7 +3833,7 @@
 			{
 				if (variableEnd > 0)
 				{
-					add_post_variable (ti, tvb, variableStart, variableEnd, valueStart, offset);
+					add_post_variable (sub_tree, tvb, variableStart, variableEnd, valueStart, offset);
 				}
 				variableStart = offset+1;
 				variableEnd = 0;
@@ -3843,13 +3845,13 @@
 		/* See if there's outstanding data */
 		if (variableEnd > 0)
 		{
-			add_post_variable (ti, tvb, variableStart, variableEnd, valueStart, offset);
+			add_post_variable (sub_tree, tvb, variableStart, variableEnd, valueStart, offset);
 		}
 	}
 	else if ((contentType == 0x22) || (contentType == 0x23) || (contentType == 0x23) || (contentType == 0x24) ||
 		 (contentType == 0x25) || (contentType == 0x26) || (contentType == 0x33))
 	{
-		add_multipart_data(ti, tvb);
+		add_multipart_data(sub_tree, tvb);
 	}
 }
 
@@ -3893,7 +3895,7 @@
 	g_free (valueBuffer);
 }
 
-void
+static void
 add_multipart_data (proto_tree *tree, tvbuff_t *tvb)
 {
 	int		 offset = 0;
@@ -4772,7 +4774,7 @@
 			}
 		},
 		{ &hf_wsp_post_data,
-			{ 	"Post Data",           
+			{ 	"Data (Post)",           
 				"wsp.post.data",
 				 FT_NONE, BASE_NONE, NULL, 0x00,
 				"Post Data", HFILL
@@ -4895,6 +4897,7 @@
 		&ett_header_cache_control_parameters,
 		&ett_header_cache_control_field_names,
 		&ett_capabilities,
+		&ett_post,
 		&ett_content_type,
 		&ett_redirect_flags,
 		&ett_redirect_afl,
