Wireshark

  • Riverbed Technology
  • WinPcap
SHARKFEST '12 - Wireshark Developer and User Conference - June 24-27, 2012 - UC Berkeley, Clark Kerr Campus
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: Re: [Wireshark-dev] GUIManger in menus.c

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 30 Sep 2010 17:30:13 -0700

On Sep 30, 2010, at 3:29 PM, Jeff Morriss wrote:

> Anders Broman wrote:
>>  Hi,
>> When using GUIManager for the main menu bar, it blows up loading a file. 
>> Could some one take a look
>> and help me figure out what's wrong? The recent file stuff is also 
>> broken - probably related.
> 
> It's bailing out here:
> 
> ERROR:column-utils.c:1175:col_set_cls_time: code should not be reached
> 
> That means timestamp_set_type() has not been called.
> 
> When we're not using GUIManager, that function is called (during 
> startup) in timestamp_format_cb().
> 
> That function is not called during startup when using GUIManager... 
> Hmmm, actually it's not being called at all.

It's called in:

	change_configuration_profile() (after reading the "recent" file, it's set to the value from that file)

	main(), if "-t" is specified;

	reftime_answered_cb() (if you answer "yes" to "Do you want to switch to "Seconds Since Beginning of Capture" now?")

	timestamp_format_cb() (when you explicitly set it through the GUI)

change_configuration_profile() is called only in profile_select() and select_profile_cb(), when you choose a profile.

The reason why it doesn't start out as TS_RELATIVE in Wireshark is, to quote the comment:

	so that "recent" in gtk/menu.c can detect this and distinguish it from a command line value

That refers to menu_recent_read_finished(), which sets recent.gui_time_format to the current time stamp value if it's not TS_NOT_SET, i.e., if it was set on the command line, that setting overrides whatever is in the recent file.

Is there some reason not to read the recent file *before* parsing the command-line arguments, so that we can just have the time stamp format initialized to TS_RELATIVE, override it from the recent file, and then possibly override *that* from the command line?
  • References:
    • [Wireshark-dev] GUIManger in menus.c
      • From: Anders Broman
    • Re: [Wireshark-dev] GUIManger in menus.c
      • From: Jeff Morriss
  • Prev by Date: [Wireshark-dev] buildbot failure in Wireshark (development) on Windows-XP-x86
  • Previous by thread: Re: [Wireshark-dev] GUIManger in menus.c
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation