Ethereal-dev: [Ethereal-dev] idl2eth in ethereal 0.8.20: BUGFIX for unions?

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

From: John.A.Mackenzie@xxxxxxxxxxx (John Mackenzie)
Date: Wed, 5 Dec 2001 18:07:55 +0100
	
	Hello Frank,

		          I have been using your idl2eth in 
	a large telecommunications project and we have 
	found it invaluable. 

		We have pushed it to the limits as our
	IDL is highly complex and nested. While testing
	I think I found a bug in how idl2eth generates 
	code for IDL unions.

		I suggest the following fix in version 1.12
	of ethereal_gen.py on line 2536:

	   template_comment_union_code_label_compare_start = """\
if (disc_s_@discname@ == @labelval@) {

 """
    template_comment_union_code_label_compare_end = """\
    ;  /* John.A.Mackenzie@xxxxxxxxxxx: Remove the break statement */
}

	This "break" was causing the generated to C code to
	exit a switch statement and thus prematurely cease
	decoding as soon as the first IDL union was parsed.

	I checked the nightly build and I think it is still in v1.16
	line 2576.

	Could you review the fix and add it to the next release?

	Thanks again for developing idl2eth. It is a great 
	contribution to debugging CORBA environments.

		Best Regards,

			John Mackenzie