diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 9734a7f862..00be8b6772 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -4239,7 +4239,7 @@ virNetworkMatch(virNetworkObjPtr netobj, int virNetworkObjListExport(virConnectPtr conn, - virNetworkObjList netobjs, + virNetworkObjListPtr netobjs, virNetworkPtr **nets, virNetworkObjListFilter filter, unsigned int flags) @@ -4250,11 +4250,11 @@ virNetworkObjListExport(virConnectPtr conn, int ret = -1; size_t i; - if (nets && VIR_ALLOC_N(tmp_nets, netobjs.count + 1) < 0) + if (nets && VIR_ALLOC_N(tmp_nets, netobjs->count + 1) < 0) goto cleanup; - for (i = 0; i < netobjs.count; i++) { - virNetworkObjPtr netobj = netobjs.objs[i]; + for (i = 0; i < netobjs->count; i++) { + virNetworkObjPtr netobj = netobjs->objs[i]; virNetworkObjLock(netobj); if ((!filter || filter(conn, netobj->def)) && virNetworkMatch(netobj, flags)) { diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index 70e6eb5b68..74665e01d0 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h @@ -440,7 +440,7 @@ VIR_ENUM_DECL(virNetworkForward) VIR_CONNECT_LIST_NETWORKS_FILTERS_AUTOSTART) int virNetworkObjListExport(virConnectPtr conn, - virNetworkObjList netobjs, + virNetworkObjListPtr netobjs, virNetworkPtr **nets, virNetworkObjListFilter filter, unsigned int flags); diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index f3e093216f..3fdeeed996 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2640,7 +2640,7 @@ networkConnectListAllNetworks(virConnectPtr conn, goto cleanup; networkDriverLock(); - ret = virNetworkObjListExport(conn, driver->networks, nets, + ret = virNetworkObjListExport(conn, &driver->networks, nets, virConnectListAllNetworksCheckACL, flags); networkDriverUnlock(); diff --git a/src/parallels/parallels_network.c b/src/parallels/parallels_network.c index 3e7087dbbf..960bd50aef 100644 --- a/src/parallels/parallels_network.c +++ b/src/parallels/parallels_network.c @@ -449,7 +449,7 @@ static int parallelsConnectListAllNetworks(virConnectPtr conn, virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1); parallelsDriverLock(privconn); - ret = virNetworkObjListExport(conn, privconn->networks, nets, NULL, flags); + ret = virNetworkObjListExport(conn, &privconn->networks, nets, NULL, flags); parallelsDriverUnlock(privconn); return ret; diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 2f55b5b2f0..1233bb1aa3 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3636,7 +3636,7 @@ testConnectListAllNetworks(virConnectPtr conn, virCheckFlags(VIR_CONNECT_LIST_NETWORKS_FILTERS_ALL, -1); testDriverLock(privconn); - ret = virNetworkObjListExport(conn, privconn->networks, nets, NULL, flags); + ret = virNetworkObjListExport(conn, &privconn->networks, nets, NULL, flags); testDriverUnlock(privconn); return ret;