From owner-freebsd-xfce@FreeBSD.ORG Fri May 16 16:31:05 2014 Return-Path: Delivered-To: freebsd-xfce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9ABAC6C for ; Fri, 16 May 2014 16:31:05 +0000 (UTC) Received: from mail-qc0-x22d.google.com (mail-qc0-x22d.google.com [IPv6:2607:f8b0:400d:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE452159 for ; Fri, 16 May 2014 16:31:05 +0000 (UTC) Received: by mail-qc0-f173.google.com with SMTP id i8so4756774qcq.32 for ; Fri, 16 May 2014 09:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=S5+Imyy75kX8bXuodhAeIMU20TQYozizgsDXzOIAxTU=; b=0NqmYDpyWCRXtv0831JrPnKPmHzNMAQhwzY5QYaZ2hpO1IhUoRTz5rm9VUhYVpD9Ih ujr6trPnwXiD6Xnp6oGMceV90DMnhPP7/SAAL209pgAeoFOkF1j8GDF5BrA2/Nr/35PI sBQ5MkQ2bOlKnh3sNHn2TCrhgXE++WFIcEEPQoWnSS1JXx4Gb9TE/1W+DIDsJFJxFEk0 U7Rr9bRP7qP44LO8fnTSZX1kq8Y0e5v6gdPRd4juEUr+i4stP9SEp1Fymv1ArI1EJ7mz vZqGdwPl+6kXDJdXxBV99QjQTtER3PL8plIwlEefAJlm8CStamzuyD3LoBtZ5nI9OGcc DTlA== MIME-Version: 1.0 X-Received: by 10.140.19.133 with SMTP id 5mr25771311qgh.46.1400257864681; Fri, 16 May 2014 09:31:04 -0700 (PDT) Received: by 10.140.49.175 with HTTP; Fri, 16 May 2014 09:31:04 -0700 (PDT) In-Reply-To: <20140516180324.2fcf73f0@shibato> References: <20140516180324.2fcf73f0@shibato> Date: Fri, 16 May 2014 18:31:04 +0200 Message-ID: Subject: Re: sysutils/xfce4-wavelan-plugin From: Olivier Duchateau To: "J.R. Oldroyd" Content-Type: text/plain; charset=UTF-8 Cc: freebsd-xfce@freebsd.org X-BeenThere: freebsd-xfce@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: XFCE for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 16:31:05 -0000 2014-05-16 18:03 GMT+02:00 J.R. Oldroyd : > 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