[Xfce4-commits] [panel-plugins/xfce4-netload-plugin] 01/01: Fix stats on some openbsd drivers (bug #13853)

noreply at xfce.org noreply at xfce.org
Wed Nov 29 10:01:20 CET 2017


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-netload-plugin.

commit 5829523b18fd83fa75daf6dc010c978251d3a9ac
Author: Landry Breuil <landry at xfce.org>
Date:   Wed Nov 29 09:59:02 2017 +0100

    Fix stats on some openbsd drivers (bug #13853)
    
    some driver names are not null-ended (re, nfe?), leading to failing
    comparisons. On top of this the comparison was wrong.
    Simpler patch than the one provided by Ed Hynan, thanks for the detailed bug
    report and thorough analysis.
---
 panel-plugin/wormulon/openbsd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/wormulon/openbsd.c b/panel-plugin/wormulon/openbsd.c
index 7a79f7b..b138c6b 100644
--- a/panel-plugin/wormulon/openbsd.c
+++ b/panel-plugin/wormulon/openbsd.c
@@ -149,10 +149,10 @@ int get_stat(netdata* data)
             /* search for the right network interface */
             if (sdl->sdl_family != AF_LINK)
                 continue;
-            if (strcmp(sdl->sdl_data, data->ifdata.if_name) != 0)
-                continue;
             strncpy(s, sdl->sdl_data, sdl->sdl_nlen);
             s[sdl->sdl_nlen] = '\0';
+            if (strcmp(s, data->ifdata.if_name) != 0)
+                continue;
 
             rx_o = data->stats.rx_bytes; tx_o = data->stats.tx_bytes;
             /* write stats */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list