It's returning virNetworkObjPtr after all. And it matches the pattern laid out by domain_conf.h. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/conf/network_conf.c | 8 ++++---- src/conf/network_conf.h | 4 ++-- src/libvirt_private.syms | 2 +- src/network/bridge_driver.c | 10 +++++----- src/parallels/parallels_network.c | 2 +- src/test/test_driver.c | 16 ++++++++-------- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 30fb309..d0e7e1b 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -101,8 +101,8 @@ virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets, return NULL; } -virNetworkObjPtr virNetworkFindByName(virNetworkObjListPtr nets, - const char *name) +virNetworkObjPtr virNetworkObjFindByName(virNetworkObjListPtr nets, + const char *name) { size_t i; @@ -370,7 +370,7 @@ virNetworkAssignDef(virNetworkObjListPtr nets, { virNetworkObjPtr network; - if ((network = virNetworkFindByName(nets, def->name))) { + if ((network = virNetworkObjFindByName(nets, def->name))) { virNetworkObjAssignDef(network, def, live); return network; } @@ -4175,7 +4175,7 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr nets, ret = 1; } else { /* UUID does not match, but if a name matches, refuse it */ - net = virNetworkFindByName(nets, def->name); + net = virNetworkObjFindByName(nets, def->name); if (net) { char uuidstr[VIR_UUID_STRING_BUFLEN]; virUUIDFormat(net->def->uuid, uuidstr); diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index 3298376..16aea99 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h @@ -303,8 +303,8 @@ bool virNetworkObjTaint(virNetworkObjPtr obj, virNetworkObjPtr virNetworkObjFindByUUID(virNetworkObjListPtr nets, const unsigned char *uuid); -virNetworkObjPtr virNetworkFindByName(virNetworkObjListPtr nets, - const char *name); +virNetworkObjPtr virNetworkObjFindByName(virNetworkObjListPtr nets, + const char *name); void virNetworkDefFree(virNetworkDefPtr def); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 140f3f4..cbba8a9 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -558,13 +558,13 @@ virNetworkDefParseNode; virNetworkDefParseString; virNetworkDefUpdateSection; virNetworkDeleteConfig; -virNetworkFindByName; virNetworkForwardTypeToString; virNetworkIpDefNetmask; virNetworkIpDefPrefix; virNetworkLoadAllConfigs; virNetworkLoadAllState; virNetworkObjAssignDef; +virNetworkObjFindByName; virNetworkObjFindByUUID; virNetworkObjFree; virNetworkObjGetPersistentDef; diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index f67822a..268af49 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2503,7 +2503,7 @@ static virNetworkPtr networkLookupByName(virConnectPtr conn, virNetworkPtr ret = NULL; networkDriverLock(); - network = virNetworkFindByName(driver->networks, name); + network = virNetworkObjFindByName(driver->networks, name); networkDriverUnlock(); if (!network) { virReportError(VIR_ERR_NO_NETWORK, @@ -3790,7 +3790,7 @@ networkAllocateActualDevice(virDomainDefPtr dom, iface->data.network.actual = NULL; networkDriverLock(); - network = virNetworkFindByName(driver->networks, iface->data.network.name); + network = virNetworkObjFindByName(driver->networks, iface->data.network.name); networkDriverUnlock(); if (!network) { virReportError(VIR_ERR_NO_NETWORK, @@ -4199,7 +4199,7 @@ networkNotifyActualDevice(virDomainDefPtr dom, return 0; networkDriverLock(); - network = virNetworkFindByName(driver->networks, iface->data.network.name); + network = virNetworkObjFindByName(driver->networks, iface->data.network.name); networkDriverUnlock(); if (!network) { virReportError(VIR_ERR_NO_NETWORK, @@ -4399,7 +4399,7 @@ networkReleaseActualDevice(virDomainDefPtr dom, return 0; networkDriverLock(); - network = virNetworkFindByName(driver->networks, iface->data.network.name); + network = virNetworkObjFindByName(driver->networks, iface->data.network.name); networkDriverUnlock(); if (!network) { virReportError(VIR_ERR_NO_NETWORK, @@ -4558,7 +4558,7 @@ networkGetNetworkAddress(const char *netname, char **netaddr) *netaddr = NULL; networkDriverLock(); - network = virNetworkFindByName(driver->networks, netname); + network = virNetworkObjFindByName(driver->networks, netname); networkDriverUnlock(); if (!network) { virReportError(VIR_ERR_NO_NETWORK, diff --git a/src/parallels/parallels_network.c b/src/parallels/parallels_network.c index 23eee89..94e77cc 100644 --- a/src/parallels/parallels_network.c +++ b/src/parallels/parallels_network.c @@ -487,7 +487,7 @@ static virNetworkPtr parallelsNetworkLookupByName(virConnectPtr conn, virNetworkPtr ret = NULL; parallelsDriverLock(privconn); - network = virNetworkFindByName(privconn->networks, name); + network = virNetworkObjFindByName(privconn->networks, name); parallelsDriverUnlock(privconn); if (!network) { virReportError(VIR_ERR_NO_NETWORK, diff --git a/src/test/test_driver.c b/src/test/test_driver.c index a747704..ecb7bcd 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3523,7 +3523,7 @@ static virNetworkPtr testNetworkLookupByName(virConnectPtr conn, virNetworkPtr ret = NULL; testDriverLock(privconn); - net = virNetworkFindByName(privconn->networks, name); + net = virNetworkObjFindByName(privconn->networks, name); testDriverUnlock(privconn); if (net == NULL) { @@ -3764,7 +3764,7 @@ static int testNetworkUndefine(virNetworkPtr network) virObjectEventPtr event = NULL; testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); if (privnet == NULL) { virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -3852,7 +3852,7 @@ static int testNetworkCreate(virNetworkPtr network) virObjectEventPtr event = NULL; testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); testDriverUnlock(privconn); if (privnet == NULL) { @@ -3888,7 +3888,7 @@ static int testNetworkDestroy(virNetworkPtr network) virObjectEventPtr event = NULL; testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); if (privnet == NULL) { virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__); @@ -3924,7 +3924,7 @@ static char *testNetworkGetXMLDesc(virNetworkPtr network, virCheckFlags(0, NULL); testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); testDriverUnlock(privconn); if (privnet == NULL) { @@ -3946,7 +3946,7 @@ static char *testNetworkGetBridgeName(virNetworkPtr network) { virNetworkObjPtr privnet; testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); testDriverUnlock(privconn); if (privnet == NULL) { @@ -3977,7 +3977,7 @@ static int testNetworkGetAutostart(virNetworkPtr network, int ret = -1; testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); testDriverUnlock(privconn); if (privnet == NULL) { @@ -4002,7 +4002,7 @@ static int testNetworkSetAutostart(virNetworkPtr network, int ret = -1; testDriverLock(privconn); - privnet = virNetworkFindByName(privconn->networks, network->name); + privnet = virNetworkObjFindByName(privconn->networks, network->name); testDriverUnlock(privconn); if (privnet == NULL) { -- 2.0.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list