From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> None of the virNWFilterDefParse* methods require a virConnectPtr arg, so just drop it Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- src/conf/nwfilter_conf.c | 15 ++++++--------- src/conf/nwfilter_conf.h | 6 ++---- src/nwfilter/nwfilter_driver.c | 2 +- src/qemu/qemu_driver.c | 3 +++ tests/nwfilterxml2xmltest.c | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index 3456b77..c009921 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2634,8 +2634,7 @@ cleanup: static virNWFilterDefPtr -virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED, - const char *xmlStr, +virNWFilterDefParse(const char *xmlStr, const char *filename) { virNWFilterDefPtr def = NULL; xmlDocPtr xml; @@ -2650,18 +2649,16 @@ virNWFilterDefParse(virConnectPtr conn ATTRIBUTE_UNUSED, virNWFilterDefPtr -virNWFilterDefParseString(virConnectPtr conn, - const char *xmlStr) +virNWFilterDefParseString(const char *xmlStr) { - return virNWFilterDefParse(conn, xmlStr, NULL); + return virNWFilterDefParse(xmlStr, NULL); } virNWFilterDefPtr -virNWFilterDefParseFile(virConnectPtr conn, - const char *filename) +virNWFilterDefParseFile(const char *filename) { - return virNWFilterDefParse(conn, NULL, filename); + return virNWFilterDefParse(NULL, filename); } @@ -3056,7 +3053,7 @@ virNWFilterObjLoad(virConnectPtr conn, virNWFilterDefPtr def; virNWFilterObjPtr nwfilter; - if (!(def = virNWFilterDefParseFile(conn, path))) { + if (!(def = virNWFilterDefParseFile(path))) { return NULL; } diff --git a/src/conf/nwfilter_conf.h b/src/conf/nwfilter_conf.h index 5d04cff..faa7527 100644 --- a/src/conf/nwfilter_conf.h +++ b/src/conf/nwfilter_conf.h @@ -713,10 +713,8 @@ int virNWFilterLoadAllConfigs(virConnectPtr conn, char *virNWFilterConfigFile(const char *dir, const char *name); -virNWFilterDefPtr virNWFilterDefParseString(virConnectPtr conn, - const char *xml); -virNWFilterDefPtr virNWFilterDefParseFile(virConnectPtr conn, - const char *filename); +virNWFilterDefPtr virNWFilterDefParseString(const char *xml); +virNWFilterDefPtr virNWFilterDefParseFile(const char *filename); void virNWFilterObjLock(virNWFilterObjPtr obj); void virNWFilterObjUnlock(virNWFilterObjPtr obj); diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c index 1ed28a2..c2afdfc 100644 --- a/src/nwfilter/nwfilter_driver.c +++ b/src/nwfilter/nwfilter_driver.c @@ -566,7 +566,7 @@ nwfilterDefineXML(virConnectPtr conn, nwfilterDriverLock(driver); virNWFilterCallbackDriversLock(); - if (!(def = virNWFilterDefParseString(conn, xml))) + if (!(def = virNWFilterDefParseString(xml))) goto cleanup; if (virNWFilterDefineXMLEnsureACL(conn, def) < 0) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e8bc04d..7376ddb 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -612,6 +612,9 @@ qemuStateInitialize(bool privileged, if (virAsprintf(&driverConf, "%s/qemu.conf", cfg->configBaseDir) < 0) goto error; + fprintf(stderr, "Start Sleeping to cause a race\n"); + sleep(10); + fprintf(stderr, "Done Sleeping to cause a race\n"); if (virQEMUDriverConfigLoadFile(cfg, driverConf) < 0) goto error; VIR_FREE(driverConf); diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c index 84e61da..14191a6 100644 --- a/tests/nwfilterxml2xmltest.c +++ b/tests/nwfilterxml2xmltest.c @@ -36,7 +36,7 @@ testCompareXMLToXMLFiles(const char *inxml, const char *outxml, virResetLastError(); - if (!(dev = virNWFilterDefParseString(NULL, inXmlData))) { + if (!(dev = virNWFilterDefParseString(inXmlData))) { if (expect_error) { virResetLastError(); goto done; -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list