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

landry pushed a 
commit to branch 
master
in repository panel-plugins/xfce4-netload-plugin.

commit 5829523b18fd83fa75daf6dc010c978251d3a9ac
Author: Landry Breuil <lan...@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.
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to