mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 22:03:49 +03:00
nwfilter: Alter @aclfilter to just @filter
Rename the variable, recent review requested just use of @filter, so be consistent throughout. NB: Also change the virNWFilterPtr to be @nwfilter to not conflict with the renamed variable.
This commit is contained in:
parent
f4b5844050
commit
59310792a6
@ -398,7 +398,7 @@ virNWFilterObjListAssignDef(virNWFilterObjListPtr nwfilters,
|
||||
int
|
||||
virNWFilterObjListNumOfNWFilters(virNWFilterObjListPtr nwfilters,
|
||||
virConnectPtr conn,
|
||||
virNWFilterObjListFilter aclfilter)
|
||||
virNWFilterObjListFilter filter)
|
||||
{
|
||||
size_t i;
|
||||
int nfilters = 0;
|
||||
@ -406,7 +406,7 @@ virNWFilterObjListNumOfNWFilters(virNWFilterObjListPtr nwfilters,
|
||||
for (i = 0; i < nwfilters->count; i++) {
|
||||
virNWFilterObjPtr obj = nwfilters->objs[i];
|
||||
virNWFilterObjLock(obj);
|
||||
if (!aclfilter || aclfilter(conn, obj->def))
|
||||
if (!filter || filter(conn, obj->def))
|
||||
nfilters++;
|
||||
virNWFilterObjUnlock(obj);
|
||||
}
|
||||
@ -418,7 +418,7 @@ virNWFilterObjListNumOfNWFilters(virNWFilterObjListPtr nwfilters,
|
||||
int
|
||||
virNWFilterObjListGetNames(virNWFilterObjListPtr nwfilters,
|
||||
virConnectPtr conn,
|
||||
virNWFilterObjListFilter aclfilter,
|
||||
virNWFilterObjListFilter filter,
|
||||
char **const names,
|
||||
int maxnames)
|
||||
{
|
||||
@ -430,7 +430,7 @@ virNWFilterObjListGetNames(virNWFilterObjListPtr nwfilters,
|
||||
virNWFilterObjPtr obj = nwfilters->objs[i];
|
||||
virNWFilterObjLock(obj);
|
||||
def = obj->def;
|
||||
if (!aclfilter || aclfilter(conn, def)) {
|
||||
if (!filter || filter(conn, def)) {
|
||||
if (VIR_STRDUP(names[nnames], def->name) < 0) {
|
||||
virNWFilterObjUnlock(obj);
|
||||
goto failure;
|
||||
@ -454,11 +454,11 @@ int
|
||||
virNWFilterObjListExport(virConnectPtr conn,
|
||||
virNWFilterObjListPtr nwfilters,
|
||||
virNWFilterPtr **filters,
|
||||
virNWFilterObjListFilter aclfilter)
|
||||
virNWFilterObjListFilter filter)
|
||||
{
|
||||
virNWFilterPtr *tmp_filters = NULL;
|
||||
int nfilters = 0;
|
||||
virNWFilterPtr filter = NULL;
|
||||
virNWFilterPtr nwfilter = NULL;
|
||||
virNWFilterObjPtr obj = NULL;
|
||||
virNWFilterDefPtr def;
|
||||
size_t i;
|
||||
@ -476,12 +476,12 @@ virNWFilterObjListExport(virConnectPtr conn,
|
||||
obj = nwfilters->objs[i];
|
||||
virNWFilterObjLock(obj);
|
||||
def = obj->def;
|
||||
if (!aclfilter || aclfilter(conn, def)) {
|
||||
if (!(filter = virGetNWFilter(conn, def->name, def->uuid))) {
|
||||
if (!filter || filter(conn, def)) {
|
||||
if (!(nwfilter = virGetNWFilter(conn, def->name, def->uuid))) {
|
||||
virNWFilterObjUnlock(obj);
|
||||
goto cleanup;
|
||||
}
|
||||
tmp_filters[nfilters++] = filter;
|
||||
tmp_filters[nfilters++] = nwfilter;
|
||||
}
|
||||
virNWFilterObjUnlock(obj);
|
||||
}
|
||||
|
@ -86,12 +86,12 @@ typedef bool
|
||||
int
|
||||
virNWFilterObjListNumOfNWFilters(virNWFilterObjListPtr nwfilters,
|
||||
virConnectPtr conn,
|
||||
virNWFilterObjListFilter aclfilter);
|
||||
virNWFilterObjListFilter filter);
|
||||
|
||||
int
|
||||
virNWFilterObjListGetNames(virNWFilterObjListPtr nwfilters,
|
||||
virConnectPtr conn,
|
||||
virNWFilterObjListFilter aclfilter,
|
||||
virNWFilterObjListFilter filter,
|
||||
char **const names,
|
||||
int maxnames);
|
||||
|
||||
@ -99,7 +99,7 @@ int
|
||||
virNWFilterObjListExport(virConnectPtr conn,
|
||||
virNWFilterObjListPtr nwfilters,
|
||||
virNWFilterPtr **filters,
|
||||
virNWFilterObjListFilter aclfilter);
|
||||
virNWFilterObjListFilter filter);
|
||||
|
||||
int
|
||||
virNWFilterObjListLoadAllConfigs(virNWFilterObjListPtr nwfilters,
|
||||
|
Loading…
x
Reference in New Issue
Block a user