ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Bug in new_packet_list_thaw/_freeze while loading file

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 23 Apr 2011 15:12:17 -0700
On Apr 23, 2011, at 11:29 AM, Jakub Zawadzki wrote:

> About actual bug:
> In old packet list _freeze stops GtkClist from redraw while adding packets to list.
> In new packet list _freeze sets empty (NULL) model, and _thaw restores model with packets.

Are there any places where freezing and thawing the list is useful any more?

The freezing/thawing code dates back to at least SVN r2 (no, that is *NOT* a typo!) of file.c:

------------------------------------------------------------------------
r2 | gerald | 1998-09-15 19:39:15 -0700 (Tue, 15 Sep 1998) | 2 lines

Initial revision

------------------------------------------------------------------------

Gerald, do you remember (from almost 13 years ago!) why you froze the GtkCList when reading the capture in and thawed it when done?  Is this something that applied to the old GTKCList but that doesn't apply to GTK2's tree view?

> I really can't remember how old packet list works while loading capture file, but I think
> code from cf_read was intented to show some packets (by redrawing GtkClist).

I think that, given the freezing, the intent was, indeed, to show some packets before the read was finished, so...

> With new packet list no packets are shown, cause _freeze works completly different.

...given that it doesn't have that effect with the new packet list...

> Ok to remove/comment out this code?

...we might as well remove it, unless I've missed something.

Then again, perhaps we can remove all the freezing and thawing code.