]> granicus.if.org Git - vnstat/commitdiff
fix automatic interface selection not working for --traffic and --live
authorTeemu Toivola <git@humdi.net>
Thu, 12 Sep 2019 19:10:19 +0000 (22:10 +0300)
committerTeemu Toivola <git@humdi.net>
Thu, 12 Sep 2019 19:10:19 +0000 (22:10 +0300)
CHANGES
src/vnstat_func.c

diff --git a/CHANGES b/CHANGES
index 47b9be5b601520255c03de2811fee21220c5aa6a..1669b9899872619fc7958115325725b6e02148a2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 2.5 / <not released yet>
 
+ - Fixed
+   - Automatic interface selection wasn't done for --traffic and --live when
+     the Interface configuration setting was left empty
+
 
 2.4 / 18-Aug-2019
 
index 5c669903243fed19c8d8df7056242b4afa91ab60..46ede5c7ab782ca3f6a030343409945e4ef5ee2f 100644 (file)
@@ -798,7 +798,7 @@ void handleifselection(PARAMS *p)
        iflist *ifl = NULL;
        iflist *dbifl = NULL, *dbifl_iterator = NULL;
 
-       if (!p->defaultiface || !p->query) {
+       if (!p->defaultiface) {
                return;
        }
 
@@ -854,7 +854,7 @@ void handleifselection(PARAMS *p)
                }
 
                iflistfree(&ifl);
-       } else {
+       } else if (p->query) {
                if (db_getiflist_sorted(&dbifl, 1) <= 0) {
                        printf("Error: Unable to discover suitable interface from database.\n");
                        iflistfree(&dbifl);