Your message dated Sat, 24 Jul 2010 00:39:42 +0200
with message-id <[email protected]>
and subject line fixed upstream
has caused the Debian Bug report #314836,
regarding ethereal-dev: generated GIOP dissectors should print sequence<octet>
nicely
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
314836: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314836
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ethereal-dev
Version: 0.10.11-1.01
Severity: wishlist
Tags: patch, upstream
Currently a sequence<octet> is presented one line per octet
in the detail view. This is ugly and not consistent with
the presentation of e.g. the object key. The sequence
should be presented in one line only.
diff -ur ethereal-0.10.11/epan/dissectors/packet-giop.c
ethereal-0.10.11.octets/epan/dissectors/packet-giop.c
--- ethereal-0.10.11/epan/dissectors/packet-giop.c 2005-06-18
18:44:59.000000000 +0000
+++ ethereal-0.10.11.octets/epan/dissectors/packet-giop.c 2005-06-18
19:24:39.436281192 +0000
@@ -1873,7 +1873,7 @@
* Caller must free the new string.
*/
-static gchar * make_printable_string (gchar *in, guint32 len) {
+gchar * make_printable_string (gchar *in, guint32 len) {
guint32 i = 0;
gchar *print_string = NULL;
diff -ur ethereal-0.10.11/epan/dissectors/packet-giop.h
ethereal-0.10.11.octets/epan/dissectors/packet-giop.h
--- ethereal-0.10.11/epan/dissectors/packet-giop.h 2005-06-18
18:45:03.000000000 +0000
+++ ethereal-0.10.11.octets/epan/dissectors/packet-giop.h 2005-06-18
18:43:13.000000000 +0000
@@ -534,7 +534,16 @@
gboolean old_stream_is_big_endian, guint32
old_boundary,
gboolean *new_stream_is_big_endian_ptr, guint32
*new_boundary_ptr );
+/* Take in an array of char and create a new string.
+ * Replace non-printable characters with periods.
+ *
+ * The array may contain \0's so dont use strdup
+ * The string is \0 terminated, and thus longer than
+ * the initial sequence.
+ * Caller must free the new string.
+ */
+extern gchar * make_printable_string (gchar *in, guint32 len);
/*
* Enums for TCkind
diff -ur ethereal-0.10.11/ethereal_gen.py
ethereal-0.10.11.octets/ethereal_gen.py
--- ethereal-0.10.11/ethereal_gen.py 2005-06-18 18:43:54.000000000 +0000
+++ ethereal-0.10.11.octets/ethereal_gen.py 2005-06-18 18:43:16.000000000
+0000
@@ -997,6 +997,9 @@
self.get_CDR_struct(type,pn)
elif pt == idltype.tk_TypeCode: # will I ever get here ?
self.get_CDR_TypeCode(pn)
+ elif pt == idltype.tk_sequence and \
+ type.unalias().seqType().kind() == idltype.tk_octet:
+ self.get_CDR_sequence_octet(type,pn)
elif pt == idltype.tk_sequence:
self.get_CDR_sequence(type,pn)
elif pt == idltype.tk_objref:
@@ -1412,6 +1415,17 @@
self.st.out(self.template_get_CDR_sequence_loop_end)
+ #
+ # Generate code to access a sequence of octet
+ #
+
+ def get_CDR_sequence_octet(self,type, pn):
+ self.st.out(self.template_get_CDR_sequence_length, seqname=pn)
+ self.st.out(self.template_get_CDR_sequence_octet, seqname=pn)
+ self.addvar(self.c_i_lim + pn + ";")
+ self.addvar("gchar * binary_seq_" + pn + ";")
+ self.addvar("gchar * text_seq_" + pn + ";")
+
#
@@ -2081,6 +2095,18 @@
"""
+ template_get_CDR_sequence_octet = """\
+if (u_octet4_lo...@seqname@ > 0 and tree) {
+ get_CDR_octet_seq(tvb, &binary_s...@seqname@, offset,
+ u_octet4_lo...@seqname@);
+ text_s...@seqname@ = make_printable_string(binary_s...@seqname@,
+ u_octet4_lo...@seqname@);
+ proto_tree_add_text(tree, tvb, *offset - u_octet4_lo...@seqname@,
+ u_octet4_lo...@seqname@, \"@seqname@: %s\", text_s...@seqname@);
+ g_free(binary_s...@seqname@);
+ g_free(text_s...@seqname@);
+}
+"""
template_get_CDR_array_start = """\
for (i...@aname@=0; i...@aname@ < @aval@; i...@aname@++) {
--- End Message ---
--- Begin Message ---
fixed 314835 0.99.2-1
fixed 314836 0.99.2-1
fixed 314871 0.99.2-1
thanks
--- End Message ---