Date: Fri, 16 May 2014 18:31:04 +0200 From: Olivier Duchateau <duchateau.olivier@gmail.com> To: "J.R. Oldroyd" <fbsd@opal.com> Cc: freebsd-xfce@freebsd.org Subject: Re: sysutils/xfce4-wavelan-plugin Message-ID: <CAHcdu2q6e2UvY-KhLJrKSYhwQ8kFtJEP8LnCrp7O_Q6R0ePY_Q@mail.gmail.com> In-Reply-To: <20140516180324.2fcf73f0@shibato> References: <20140516180324.2fcf73f0@shibato>
next in thread | previous in thread | raw e-mail | index | archive | help
2014-05-16 18:03 GMT+02:00 J.R. Oldroyd <fbsd@opal.com>: > sysutils/xfce4-wavelan-plugin no longer works. > > Looking at the code, there are various problems. It looks for a sysctl > oid that doesn't exist, it returns the interface rssi value instead of > properly calculating the signal quality, it uses that incorrect rssi > value also as the signal percentage, but worse... all the FreeBSD code > is compiled out anyway due to tests for FreeBSD_version being done before > sys/param.h is included!! > > I've posted two patches (URLs below) that fix these problems and make it > work again. I also fix the percentage values at which the color changes, > I use 25%, 50% and 75% instead of the strange values 40%, 55% and 70% that > are there now. > > I've named these files extra-patch-foo for now, but they should be renamed > to patch-foo and merged in with the existing patches already there. > > The code in wi_bsd.c is a mess! There is no need to be using the kernel > values __FreeBSD_kernel__ or __FreeBSD_kernel_version here or even > __FreeBSD_kernel_kernel__ (yes, really)! I didn't clean that stuff up > with this patch, but if desired, I can do so. Maybe there's a reason > it's like this? > > -jr > > http://opal.com/jr/freebsd/ports/sysutils/xfce4-wavelan-plugin/extra-patch-panel-plugin__wavelan.c > http://opal.com/jr/freebsd/ports/sysutils/xfce4-wavelan-plugin/extra-patch-panel-plugin__wi_bsd.c Thanks you for your help. When I upgraded this plugin, I removed some old code too [1], but development seems to stop. As I don't use this plugin, so I didn't notice odd behaviour of percentage. Check of kernel version is used for Debian GNU/kFreeBSD port (I know it's overkill). [1] https://bugzilla.xfce.org/show_bug.cgi?id=8833 -- olivier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHcdu2q6e2UvY-KhLJrKSYhwQ8kFtJEP8LnCrp7O_Q6R0ePY_Q>