Bug 82242 - wmnetload not run with libdockapp 0.6.0
Summary: wmnetload not run with libdockapp 0.6.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sam Lawrance
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 20:50 UTC by regisr
Modified: 2005-06-15 12:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description regisr 2005-06-14 20:50:14 UTC
     running wmnetload with parameter abort (run with only the defaults parameters: -h, -v or -w ):
Error message:
Assertion failed: (strlen(needle) == 2), function contains, file daargs.c, line 108.

With libdockapp 0.6.0 (works with previous version 0.4.0)
Comment 1 Sam Lawrance freebsd_committer freebsd_triage 2005-06-15 06:33:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->lawrance

I'll handle this.
Comment 2 Sam Lawrance 2005-06-15 07:07:17 UTC
This problem was caused by a change in the options handling code in
libdockapp.  Libdockapp 0.4.0 had no restrictions on the length of short
form (one hyphen) options, eg -display or -d would be okay.  0.6.0
asserts that short form options are only one character, so -display will
cause a similar error to the one reported.

I have emailed the libdockapp author to see if we can get the old
behaviour back since there are dockapps that still rely on it.

In the meantime I will introduce a local patch to revert to the original
behaviour.

Cheers
Sam
Comment 3 regisr 2005-06-15 07:18:04 UTC
Hello,

In the following example the option has only 1 character and this not
work too!=20

%wmnetload -i tun0
Assertion failed: (strlen(needle) =3D=3D 2), function contains, file
daargs.c, line 108. Abandon (core dumped)

Sincerely,
R=E9gis


On Wed, 15 Jun 2005 16:07:17 +1000
Sam Lawrance <boris@brooknet.com.au> a =E9crit:

> This problem was caused by a change in the options handling code in
> libdockapp.  Libdockapp 0.4.0 had no restrictions on the length of short
> form (one hyphen) options, eg -display or -d would be okay.  0.6.0
> asserts that short form options are only one character, so -display will
> cause a similar error to the one reported.
>=20
> I have emailed the libdockapp author to see if we can get the old
> behaviour back since there are dockapps that still rely on it.
>=20
> In the meantime I will introduce a local patch to revert to the original
> behaviour.
>=20
> Cheers
> Sam
>=20
>=20
>=20
>=20


--=20
regis
Comment 4 Sam Lawrance 2005-06-15 07:29:40 UTC
On Wed, 2005-06-15 at 08:18 +0200, regisr wrote:
> Hello,
> 
> In the following example the option has only 1 character and this not
> work too! 
> 
> %wmnetload -i tun0
> Assertion failed: (strlen(needle) == 2), function contains, file
> daargs.c, line 108. Abandon (core dumped)

It's the same problem.  libdockapp goes through the list of options to
find a match for "-i".  This is the list for wmnetload:

static DAProgramOption options[] = {
        { "-d", "--display", "sets display to use", DOString },
        { "-bl", "--backlight", "turns on backlight", DONone },
        { "-lc", "--lightcolor", "sets backlight color (default: #6EC63B)",
          DOString },
        { "-u", "--update", "sets update interval (in seconds)", DOInteger },
        { "-i", "--interface", "sets interface to monitor", DOString },
        { "-n", "--no-ifname", "does not display interface name", DONone },
        { "-s", "--smooth", "sets smoothing value (experimental)", DOInteger },
        { "-b", "--bytes", "display bytes/sec instead of bits/sec", DONone },
        { "-a", "--alarm", "activates alarm mode. <number> is in kbits/sec\n"
          "\t\t\t\t(or kbytes/sec if -b is specified)", DOInteger }
};

So before it even gets to "-i" it fails because "-bl" contains more than
one character.
Comment 5 Sam Lawrance freebsd_committer freebsd_triage 2005-06-15 12:45:36 UTC
State Changed
From-To: open->closed

Fix committed, thanks for the report!