Ethereal-dev: Re: [Ethereal-dev] Bugs in mode-sense handling in packet-scsi.c

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Mon, 19 Aug 2002 06:07:56 -0700
On Thu, Aug 15, 2002 at 08:44:44PM -0700, Bill Studenmund wrote:
> The attached patch fixes this, and makes it so that I can decode the mode
> sense pages correctly.

It turns out there were some more problems in the handling of MODE SENSE
and MODE SELECT; I've checked in a fix.

> I also noticed that line 1580 (before patch) looks very strange:
> 
> proto_tree_add_text (tree, tvb, offset, 1, "PS: %u", (pcode & 0x80) >> 8)
> 
> Note that 0x80 >> 8 is zero, so (pcode & 0x80) >> 8 can never be non-zero.

It's supposed to be (pcode & 0x80) >> 7; I checked that in as well.