[libvirt] [PATCH] Fix 'make check' runs due to usage of conn parameter in error reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes the 'make check' runs for me which, under certain
circumstances and login configurations, did invoke popups requesting
authentication. I removed the parameter conn from being passed into the
error reporting function.

Signed-off-by; Stefan Berger <stefanb@xxxxxxxxxx>


---
 src/conf/nwfilter_conf.c |   15 ++++++---------
 src/conf/nwfilter_conf.h |    3 ++-
 2 files changed, 8 insertions(+), 10 deletions(-)

Index: libvirt/src/conf/nwfilter_conf.c
===================================================================
--- libvirt.orig/src/conf/nwfilter_conf.c
+++ libvirt/src/conf/nwfilter_conf.c
@@ -44,9 +44,6 @@
 
 #define VIR_FROM_THIS VIR_FROM_NWFILTER
 
-#define virNWFilterError(conn, code, fmt...)                             \
-            virReportErrorHelper(conn, VIR_FROM_NWFILTER, code, __FILE__,\
-                                  __FUNCTION__, __LINE__, fmt)
 
 VIR_ENUM_IMPL(virNWFilterRuleAction, VIR_NWFILTER_RULE_ACTION_LAST,
               "drop",
@@ -2248,9 +2245,9 @@ virNWFilterPoolObjLoad(virConnectPtr con
     }
 
     if (!virFileMatchesNameSuffix(file, def->name, ".xml")) {
-        virNWFilterError(conn, VIR_ERR_INVALID_NWFILTER,
-            "NWFilter pool config filename '%s' does not match pool name '%s'",
-                      path, def->name);
+        virNWFilterReportError(conn, VIR_ERR_INVALID_NWFILTER,
+            _("network filter pool config filename '%s' does not match pool name '%s'"),
+            path, def->name);
         virNWFilterDefFree(def);
         return NULL;
     }
@@ -2300,9 +2297,9 @@ virNWFilterPoolLoadAllConfigs(virConnect
 
         if (virFileBuildPath(configDir, entry->d_name,
                              NULL, path, PATH_MAX) < 0) {
-            virNWFilterError(conn, VIR_ERR_INTERNAL_ERROR,
-                            "Config filename '%s/%s' is too long",
-                            configDir, entry->d_name);
+            virNWFilterReportError(conn, VIR_ERR_INTERNAL_ERROR,
+                                   _("config filename '%s/%s' is too long"),
+                                   configDir, entry->d_name);
             continue;
         }
 
Index: libvirt/src/conf/nwfilter_conf.h
===================================================================
--- libvirt.orig/src/conf/nwfilter_conf.h
+++ libvirt/src/conf/nwfilter_conf.h
@@ -523,7 +523,8 @@ int virNWFilterParamConfLayerInit(void);
 void virNWFilterParamConfLayerShutdown(void);
 
 # define virNWFilterReportError(conn, code, fmt...)                          \
-        virReportErrorHelper(conn, VIR_FROM_NWFILTER, code, __FILE__,       \
+        (void)conn;                                                          \
+        virReportErrorHelper(NULL, VIR_FROM_NWFILTER, code, __FILE__,	\
                                __FUNCTION__, __LINE__, fmt)
 
 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]