aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal_gen.py
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-04-19 05:17:46 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-04-19 05:17:46 +0000
commit2301071bda6f0e18ee24bb2a017c14faa88f3fdc (patch)
tree9bd37ac7140411d36ce01196aa043576aa8cdcc9 /ethereal_gen.py
parent87077ede81a4eef4088f81360138c354544229fe (diff)
From W.Borgert:
this patch leads to a more condensed representation of strings in the GIOP module, e.g. in Parlay instead of having: length = 42 TpAddress_AddrString = sip:anyone@somebody.thehost.whose.es:5432 you have now: TpAddress_AddrString (42) = sip:anyone@somebody.thehost.whose.es:5432 The former was not as concise, if you have a lot of strings (as in CosNaming) and it was not clear whether the protocol had a explicit field named "length" in the IDL. svn path=/trunk/; revision=17902
Diffstat (limited to 'ethereal_gen.py')
-rw-r--r--ethereal_gen.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/ethereal_gen.py b/ethereal_gen.py
index 338fb6b89b..a21100068b 100644
--- a/ethereal_gen.py
+++ b/ethereal_gen.py
@@ -2030,10 +2030,8 @@ if (tree) {
template_get_CDR_string = """\
u_octet4 = get_CDR_string(tvb, &seq, offset, stream_is_big_endian, boundary);
if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"@varname@ = %s",seq);
-
+ proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"@varname@ (%u) = %s",
+ u_octet4, (u_octet4 > 0) ? seq : \"\");
}
g_free(seq); /* free buffer */
@@ -2044,10 +2042,8 @@ seq = NULL;
template_get_CDR_wstring = """\
u_octet4 = get_CDR_wstring(tvb, &seq, offset, stream_is_big_endian, boundary, header);
if (tree) {
- proto_tree_add_text(tree,tvb,*offset-4-u_octet4,4,"length = %u",u_octet4);
- if (u_octet4 > 0)
- proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"@varname@ = %s",seq);
-
+ proto_tree_add_text(tree,tvb,*offset-u_octet4,u_octet4,"@varname@ (%u) = %s",
+ u_octet4, (u_octet4 > 0) ? seq : \"\");
}
g_free(seq); /* free buffer */