Ethereal-dev: [Ethereal-dev] Re: Patch for packet-bacapp.c

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

From: Steve Karg <skarg@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Sep 2005 17:46:22 -0400
Hi David,

Here is a patch for packet-bacapp.c.

I applied this to the current file in subversion, and then cleaned up a couple of gcc compile warnings. I tested it with a number of captures that I have, and things are looking very good!

1) Fix octet string decoding.

Hmmm...

The tvb_bytes_to_str() handles a gob of data and puts it in a nice 12345... kinda format, so you don't do a loop on the gob of data, and you don't need to feed tvb_bytes_to_str() with 128 byte chunks. Since this is an octet string, the user can just look at the highlighting to see all the values, no? I got rid of the loop.

I also liked having the Application tag before the data, but you have chosen to make it a subtree. Is there a reason to have it a subtree? I left it alone, but it bugs me :-)

2) Create fAccessMethod function to eliminate some redundant code.

The compiler warnings were from this function which was refactored, but the function had some dangling pointers and a bad return value, so I fixed it.

The svn diff patch that I have attached includes the changes from your last patch, which appears to have not been checked in yet.

Best Regards,

Steve

Attachment: bacapp.patch.gz
Description: GNU Zip compressed data