Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Incorrect decoding at first time, then filtering at the seco

From: Christopher Maynard <Chris.Maynard@xxxxxxxxx>
Date: Wed, 8 Dec 2010 16:15:48 +0000 (UTC)
Vishal Kumar Singh <vishal.ismdh@...> writes:

> Hi All,In wireshark, I am trying to decode a packet by taking its information
from the last decoded packet (Control packet and Data Packet). In the first
time, few data packet takes wrong information and, decodes the packet
accordingly. When I mark the faulty packet and clear the filter, the decoding of
faulty packet becomes good. What  should be the reason behind this? Please, help
me out.regards,Vishal Kumar Singh

Just a guess, but you may have some code surrounded by an "if (tree) { ... }"
block that shouldn't be.  If you have any "if (tree)"'s in your code,
temporarily try replacing them with "if (1)" to see if it makes any difference.
 If it does, you can either leave it that way or figure out which parts need to
be called regardless of tree being NULL or not.  Review the skeleton code in
section 1.2 of doc/README.developer for more guidelines.

If this isn't your problem, then you might consider posting your code if you can.