Ethereal-dev: Re: [Ethereal-dev] New updates for wsp and wtls

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Mon, 19 Feb 2001 13:02:39 -0800
On Mon, Feb 19, 2001 at 09:23:03AM -0300, Alexandre P. Ferreira wrote:
> ***************
> *** 536,550 ****
>   			wtls_msg_type_item_sub_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item_sub);
>   			offset+=2;
>   			for (;count > 0;count-=client_size) {
>   				cli_key_item = proto_tree_add_item(wtls_msg_type_item_sub_tree, 
>   						hf_wtls_hands_cli_hello_key_exchange, tvb, offset,1,
> ! 						bo_little_endian);
>   				client_size=1;
>   				wtls_msg_type_item_sub_sub_tree = proto_item_add_subtree(cli_key_item, 
>   								  ett_wtls_msg_type_item_sub_sub);
> ! 				ti = proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
>   						hf_wtls_hands_cli_hello_key_exchange_suite,
> ! 						tvb,offset,1,bo_big_endian);
>   				offset++;
>   				value = tvb_get_guint8 (tvb, offset);
>   				ti = proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,
> --- 537,552 ----
>   			wtls_msg_type_item_sub_tree = proto_item_add_subtree(ti, ett_wtls_msg_type_item_sub);
>   			offset+=2;
>   			for (;count > 0;count-=client_size) {
> + 				value = tvb_get_guint8 (tvb, offset);
>   				cli_key_item = proto_tree_add_item(wtls_msg_type_item_sub_tree, 
>   						hf_wtls_hands_cli_hello_key_exchange, tvb, offset,1,
> ! 						value);
>   				client_size=1;
>   				wtls_msg_type_item_sub_sub_tree = proto_item_add_subtree(cli_key_item, 
>   								  ett_wtls_msg_type_item_sub_sub);
> ! 				ti = proto_tree_add_uint(wtls_msg_type_item_sub_sub_tree,
>   						hf_wtls_hands_cli_hello_key_exchange_suite,
> ! 						tvb,offset,1,value);
>   				offset++;
>   				value = tvb_get_guint8 (tvb, offset);
>   				ti = proto_tree_add_item(wtls_msg_type_item_sub_sub_tree,


"proto_tree_add_item()" takes a big-endian vs. little-endian flag, not a
value, as an argument, so

				cli_key_item = proto_tree_add_item(wtls_msg_type_item_sub_tree, 
						hf_wtls_hands_cli_hello_key_exchange, tvb, offset,1,
						bo_little_endian);

should be changed to

				cli_key_item = proto_tree_add_uint(wtls_msg_type_item_sub_tree, 
						hf_wtls_hands_cli_hello_key_exchange, tvb, offset,1,
						value);

in the above.

Checked in (with the change I added).