Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 23560: /trunk/ /trunk/doc/: wireshar

From: Sake Blok <sake@xxxxxxxxxx>
Date: Sun, 25 Nov 2007 14:48:55 +0100
On Sun, Nov 25, 2007 at 02:23:28PM +0100, Stig Bj?rlykke wrote:
> On 25. nov.. 2007, at 03.39, Stig Bj??rlykke wrote:
> 
> > It works correct on my Ubuntu.
> 
> Well, not exactly correct.  I also get the crash on Ubuntu.
> 
> Load a capture with two conversations.  Select one conversation and  
> pless ctrl-5 ctrl-6 ctrl-7 ctrl-8.  Only the color for ctrl-5 is  
> used.

This is works as designed :-)
There are 10 temporary coloring rules and they are in order of
preference (they are prepended to the coloring rules). This
means that when you select conversation-1 and press ctrl-5 and ctrl-6
both color-rule 5 and -6 use the same filter, but 5 has precedence
over 6 so the color of 5 is used for the conversation.


> Select the other conversation and press ctrl-5 ctrl-6 ctrl-7  
> ctrl-8.  Observe the wrong conversation is updated.

Since conversation-1 still uses color-5, updating rule-5 by pressing
ctrl-5 will *also* change the coloring of conversation-1, because now
rule-6 will match conversation-1, hence the color of conversation-1
will change from color-5 to color-6 and the color of conversation-2
will change to color-5

> Now press ctrl-4 ctrl-3 ctrl-2 ctrl-1 and observe the color change  
> when "downgrade".

The downgrade happens because of the precedence.

The only way to make the color of a conversation really "move" is to
check whether there is already a temporary coloring rule for the same
filter and clear that one before adding the filter to the new coloring
rule.

Do you think that would be a usefull addition? I think if you know about
the precedence, it is not necessary to be able to "move" them anymore.

> Pressing ctrl-space a couple of times now usually  
> triggers a crash.

I can't reproduce this (yet), but I do think I know where it's coming
from. I use color_filters_init() for ctrl-space, but that just deletes
the color-filters. I think they should instead be added to the
deleted-list.

I'll have a look into this :-)

Cheers,
    Sake