Wireshark-bugs: [Wireshark-bugs] [Bug 5896] New: The "range" field in Lua's "Pref.range()" serve

Date: Thu, 5 May 2011 17:57:25 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5896

           Summary: The "range" field in Lua's "Pref.range()" serves as
                    default while the "default" field does nothing
           Product: Wireshark
           Version: 1.4.6
          Platform: x86-64
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Minor
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: tony19@xxxxxxxxx


Created an attachment (id=6293)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=6293)
Sample dissector that demonstrates "range" as default in Pref.range()

Build Information:
2011-05-05 20:11:20.550 defaults[10439:903] 
The domain/default pair of (kCFPreferencesAnyApplication,
AppleAquaColorVariant) does not exist
2011-05-05 20:11:20.557 defaults[10440:903] 
The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor)
does not exist
wireshark 1.4.6 (SVN Rev 36706 from /trunk-1.4)

Copyright 1998-2011 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with GTK+ 2.20.1, with GLib 2.24.1, with libpcap 1.0.0, with
libz 1.2.3, without POSIX capabilities, without libpcre, without SMI, without
c-ares, without ADNS, with Lua 5.1, without Python, without GnuTLS, without
Gcrypt, with MIT Kerberos, without GeoIP, with PortAudio V19-devel (built Jan
11
2011 18:26:13), without AirPcap.

Running on Darwin 10.7.0 (Mac OS 10.6.7), with libpcap version 1.0.0, with libz
1.2.3.

Built using gcc 4.2.1 (Apple Inc. build 5666) (dot 3).

--
The "default" field of Lua's Pref.range() has no apparent effect. The "range"
field actually serves as the default. (Perhaps the "range" field should be
removed in favor of the "default" field, which is more consistent with the
other preferences.)

Steps:

1. Copy attached Lua dissector to plugins directory and restart Wireshark.

2. Open menu Tools > Lua > Console

3. Open menu Tools > Foo Test

4. Observe that the print out shows the range as "1-100,500", which is the
value of the "range" field instead of the "default" field.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.