ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: [Ethereal-dev] Unnecessary checks to see if COL_PROTOCOL is being displayed

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

From: Richard Sharpe <rsharpe@xxxxxxxxxxxxxxxxx>
Date: Thu, 18 Sep 2003 00:16:21 -0700 (PDT)
Hi,

I was documenting some stuff on dissectors when I noticed that pretty much 
all dissectors have this as the first statement in them:

        if (check_col(pinfo->cinfo, COL_PROTOCOL))
                col_set_str(pinfo->cinfo, COL_PROTOCOL, "POP");

However, if it is being called to build the protocol tree, should it 
bother to update the summary pane, as that has most likely already been 
done.

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com