Ethereal-dev: Re: [Ethereal-dev] wierd behaviour of Resolve Name

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Fri, 13 Feb 2004 02:26:51 +0100
Guy Harris wrote:


On Feb 12, 2004, at 3:57 PM, Pavel Kaňkovský wrote:

Resolve Name in the frame's context menu appears to be available
if and only if ALL kinds of name resolution are disable in
preferences.


I've checked in a change that should fix that.

When I understand this correct, the context menu entry should be enabled, if at least one of the flags (one of the resolution methods) is set.

Are you sure this is correct now?

 set_menu_sensitivity(tree_view_menu_factory, "/Resolve Name",
cf->current_frame != NULL && (g_resolv_flags & RESOLV_ALL_ADDRS) != RESOLV_ALL_ADDRS);

This will remove all bits not interesting (keeping only the bits for RESOLV_MAC / RESOLV_NETWORK / RESOLV_TRANSPORT in the flags):

(g_resolv_flags & RESOLV_ALL_ADDRS)

and then compare the result with the three interesting flags:

(g_resolv_flags & RESOLV_ALL_ADDRS) != RESOLV_ALL_ADDRS

but: this will enable the function, until *all* three resolution flags are set.

I think:

     cf->current_frame != NULL && (g_resolv_flags & RESOLV_ALL_ADDRS));

would be better, as this will enable this function, when at least one of the flags is set.


Or just do I understand this completely wrong?

Regards, ULFL