Ethereal-dev: Re: [Ethereal-dev] Can we remove stderr from the kerberos dissector?

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 5 Nov 2003 22:56:13 -0800
On Wed, Nov 05, 2003 at 07:30:01PM -0800, Jaime Fournier wrote:
> I run into the problem with stderr being spit out on
> the kerberos dissector on line 484 
> fprintf(stderr,"not definite: %s\n",token); \ 
> in the KRB_HEAD_DECODE_OR_DIE(token) macro.
> 
> It causes a lot of noise, and as it is already printed
> out on col_info I was wondering if there was any
> non-debug reason to keep it.

None that I can think of - but I'd replace "kerberos dissector" with
"all dissectors", and note that "stderr" includes "g_warning()" calls.

If a packet has a problem (i.e., it's not a valid packet), the problem
should be *reported in the protocol tree*, not printed on the console.

If the dissector can't handle something in a valid packet, it should
arguably either put that into the protocol tree (which is probably the
right thing to do there) or just quietly skip it (as would be the case
with, for example, an unknown transport for RTSP).