提交 5ebe530e 编写于 作者: J John Ferlan

nwfilter: Rename some virNWFilterObj* API's

Prefix should have been virNWFilterObjList since the API is operating on
the list of filters.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 298d9f61
...@@ -111,8 +111,8 @@ virNWFilterObjListFree(virNWFilterObjListPtr nwfilters) ...@@ -111,8 +111,8 @@ virNWFilterObjListFree(virNWFilterObjListPtr nwfilters)
void void
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters, virNWFilterObjListRemove(virNWFilterObjListPtr nwfilters,
virNWFilterObjPtr obj) virNWFilterObjPtr obj)
{ {
size_t i; size_t i;
...@@ -133,8 +133,8 @@ virNWFilterObjRemove(virNWFilterObjListPtr nwfilters, ...@@ -133,8 +133,8 @@ virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
virNWFilterObjPtr virNWFilterObjPtr
virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters, virNWFilterObjListFindByUUID(virNWFilterObjListPtr nwfilters,
const unsigned char *uuid) const unsigned char *uuid)
{ {
size_t i; size_t i;
virNWFilterObjPtr obj; virNWFilterObjPtr obj;
...@@ -154,8 +154,8 @@ virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters, ...@@ -154,8 +154,8 @@ virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters,
virNWFilterObjPtr virNWFilterObjPtr
virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters, virNWFilterObjListFindByName(virNWFilterObjListPtr nwfilters,
const char *name) const char *name)
{ {
size_t i; size_t i;
virNWFilterObjPtr obj; virNWFilterObjPtr obj;
...@@ -175,9 +175,9 @@ virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters, ...@@ -175,9 +175,9 @@ virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters,
static int static int
_virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters, _virNWFilterObjListDefLoopDetect(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def, virNWFilterDefPtr def,
const char *filtername) const char *filtername)
{ {
int rc = 0; int rc = 0;
size_t i; size_t i;
...@@ -196,11 +196,11 @@ _virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters, ...@@ -196,11 +196,11 @@ _virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters,
break; break;
} }
obj = virNWFilterObjFindByName(nwfilters, obj = virNWFilterObjListFindByName(nwfilters,
entry->include->filterref); entry->include->filterref);
if (obj) { if (obj) {
rc = _virNWFilterObjDefLoopDetect(nwfilters, obj->def, rc = _virNWFilterObjListDefLoopDetect(nwfilters, obj->def,
filtername); filtername);
virNWFilterObjUnlock(obj); virNWFilterObjUnlock(obj);
if (rc < 0) if (rc < 0)
break; break;
...@@ -213,7 +213,7 @@ _virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters, ...@@ -213,7 +213,7 @@ _virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters,
/* /*
* virNWFilterObjDefLoopDetect: * virNWFilterObjListDefLoopDetect:
* @nwfilters : the nwfilters to search * @nwfilters : the nwfilters to search
* @def : the filter definition that may add a loop and is to be tested * @def : the filter definition that may add a loop and is to be tested
* *
...@@ -223,10 +223,10 @@ _virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters, ...@@ -223,10 +223,10 @@ _virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters,
* Returns 0 in case no loop was detected, -1 otherwise. * Returns 0 in case no loop was detected, -1 otherwise.
*/ */
static int static int
virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters, virNWFilterObjListDefLoopDetect(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def) virNWFilterDefPtr def)
{ {
return _virNWFilterObjDefLoopDetect(nwfilters, def, def->name); return _virNWFilterObjListDefLoopDetect(nwfilters, def, def->name);
} }
...@@ -279,13 +279,13 @@ virNWFilterDefEqual(const virNWFilterDef *def1, ...@@ -279,13 +279,13 @@ virNWFilterDefEqual(const virNWFilterDef *def1,
virNWFilterObjPtr virNWFilterObjPtr
virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, virNWFilterObjListAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def) virNWFilterDefPtr def)
{ {
virNWFilterObjPtr obj; virNWFilterObjPtr obj;
virNWFilterDefPtr objdef; virNWFilterDefPtr objdef;
if ((obj = virNWFilterObjFindByUUID(nwfilters, def->uuid))) { if ((obj = virNWFilterObjListFindByUUID(nwfilters, def->uuid))) {
objdef = obj->def; objdef = obj->def;
if (STRNEQ(def->name, objdef->name)) { if (STRNEQ(def->name, objdef->name)) {
...@@ -298,7 +298,7 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, ...@@ -298,7 +298,7 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
} }
virNWFilterObjUnlock(obj); virNWFilterObjUnlock(obj);
} else { } else {
if ((obj = virNWFilterObjFindByName(nwfilters, def->name))) { if ((obj = virNWFilterObjListFindByName(nwfilters, def->name))) {
char uuidstr[VIR_UUID_STRING_BUFLEN]; char uuidstr[VIR_UUID_STRING_BUFLEN];
objdef = obj->def; objdef = obj->def;
...@@ -311,14 +311,14 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, ...@@ -311,14 +311,14 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
} }
} }
if (virNWFilterObjDefLoopDetect(nwfilters, def) < 0) { if (virNWFilterObjListDefLoopDetect(nwfilters, def) < 0) {
virReportError(VIR_ERR_OPERATION_FAILED, virReportError(VIR_ERR_OPERATION_FAILED,
"%s", _("filter would introduce a loop")); "%s", _("filter would introduce a loop"));
return NULL; return NULL;
} }
if ((obj = virNWFilterObjFindByName(nwfilters, def->name))) { if ((obj = virNWFilterObjListFindByName(nwfilters, def->name))) {
objdef = obj->def; objdef = obj->def;
if (virNWFilterDefEqual(def, objdef, false)) { if (virNWFilterDefEqual(def, objdef, false)) {
...@@ -357,9 +357,9 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, ...@@ -357,9 +357,9 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
int int
virNWFilterObjNumOfNWFilters(virNWFilterObjListPtr nwfilters, virNWFilterObjListNumOfNWFilters(virNWFilterObjListPtr nwfilters,
virConnectPtr conn, virConnectPtr conn,
virNWFilterObjListFilter aclfilter) virNWFilterObjListFilter aclfilter)
{ {
size_t i; size_t i;
int nfilters = 0; int nfilters = 0;
...@@ -377,11 +377,11 @@ virNWFilterObjNumOfNWFilters(virNWFilterObjListPtr nwfilters, ...@@ -377,11 +377,11 @@ virNWFilterObjNumOfNWFilters(virNWFilterObjListPtr nwfilters,
int int
virNWFilterObjGetNames(virNWFilterObjListPtr nwfilters, virNWFilterObjListGetNames(virNWFilterObjListPtr nwfilters,
virConnectPtr conn, virConnectPtr conn,
virNWFilterObjListFilter aclfilter, virNWFilterObjListFilter aclfilter,
char **const names, char **const names,
int maxnames) int maxnames)
{ {
int nnames = 0; int nnames = 0;
size_t i; size_t i;
...@@ -463,9 +463,9 @@ virNWFilterObjListExport(virConnectPtr conn, ...@@ -463,9 +463,9 @@ virNWFilterObjListExport(virConnectPtr conn,
static virNWFilterObjPtr static virNWFilterObjPtr
virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters, virNWFilterObjListLoadConfig(virNWFilterObjListPtr nwfilters,
const char *configDir, const char *configDir,
const char *name) const char *name)
{ {
virNWFilterDefPtr def = NULL; virNWFilterDefPtr def = NULL;
virNWFilterObjPtr obj; virNWFilterObjPtr obj;
...@@ -490,7 +490,7 @@ virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters, ...@@ -490,7 +490,7 @@ virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters,
virNWFilterSaveConfig(configDir, def) < 0) virNWFilterSaveConfig(configDir, def) < 0)
goto error; goto error;
if (!(obj = virNWFilterObjAssignDef(nwfilters, def))) if (!(obj = virNWFilterObjListAssignDef(nwfilters, def)))
goto error; goto error;
VIR_FREE(configFile); VIR_FREE(configFile);
...@@ -504,8 +504,8 @@ virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters, ...@@ -504,8 +504,8 @@ virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters,
int int
virNWFilterObjLoadAllConfigs(virNWFilterObjListPtr nwfilters, virNWFilterObjListLoadAllConfigs(virNWFilterObjListPtr nwfilters,
const char *configDir) const char *configDir)
{ {
DIR *dir; DIR *dir;
struct dirent *entry; struct dirent *entry;
...@@ -521,7 +521,7 @@ virNWFilterObjLoadAllConfigs(virNWFilterObjListPtr nwfilters, ...@@ -521,7 +521,7 @@ virNWFilterObjLoadAllConfigs(virNWFilterObjListPtr nwfilters,
if (!virFileStripSuffix(entry->d_name, ".xml")) if (!virFileStripSuffix(entry->d_name, ".xml"))
continue; continue;
obj = virNWFilterObjLoadConfig(nwfilters, configDir, entry->d_name); obj = virNWFilterObjListLoadConfig(nwfilters, configDir, entry->d_name);
if (obj) if (obj)
virNWFilterObjUnlock(obj); virNWFilterObjUnlock(obj);
} }
......
...@@ -59,20 +59,20 @@ void ...@@ -59,20 +59,20 @@ void
virNWFilterObjListFree(virNWFilterObjListPtr nwfilters); virNWFilterObjListFree(virNWFilterObjListPtr nwfilters);
void void
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters, virNWFilterObjListRemove(virNWFilterObjListPtr nwfilters,
virNWFilterObjPtr obj); virNWFilterObjPtr obj);
virNWFilterObjPtr virNWFilterObjPtr
virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters, virNWFilterObjListFindByUUID(virNWFilterObjListPtr nwfilters,
const unsigned char *uuid); const unsigned char *uuid);
virNWFilterObjPtr virNWFilterObjPtr
virNWFilterObjFindByName(virNWFilterObjListPtr nwfilters, virNWFilterObjListFindByName(virNWFilterObjListPtr nwfilters,
const char *name); const char *name);
virNWFilterObjPtr virNWFilterObjPtr
virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters, virNWFilterObjListAssignDef(virNWFilterObjListPtr nwfilters,
virNWFilterDefPtr def); virNWFilterDefPtr def);
int int
virNWFilterObjTestUnassignDef(virNWFilterObjPtr obj); virNWFilterObjTestUnassignDef(virNWFilterObjPtr obj);
...@@ -82,16 +82,16 @@ typedef bool ...@@ -82,16 +82,16 @@ typedef bool
virNWFilterDefPtr def); virNWFilterDefPtr def);
int int
virNWFilterObjNumOfNWFilters(virNWFilterObjListPtr nwfilters, virNWFilterObjListNumOfNWFilters(virNWFilterObjListPtr nwfilters,
virConnectPtr conn, virConnectPtr conn,
virNWFilterObjListFilter aclfilter); virNWFilterObjListFilter aclfilter);
int int
virNWFilterObjGetNames(virNWFilterObjListPtr nwfilters, virNWFilterObjListGetNames(virNWFilterObjListPtr nwfilters,
virConnectPtr conn, virConnectPtr conn,
virNWFilterObjListFilter aclfilter, virNWFilterObjListFilter aclfilter,
char **const names, char **const names,
int maxnames); int maxnames);
int int
virNWFilterObjListExport(virConnectPtr conn, virNWFilterObjListExport(virConnectPtr conn,
...@@ -100,8 +100,8 @@ virNWFilterObjListExport(virConnectPtr conn, ...@@ -100,8 +100,8 @@ virNWFilterObjListExport(virConnectPtr conn,
virNWFilterObjListFilter aclfilter); virNWFilterObjListFilter aclfilter);
int int
virNWFilterObjLoadAllConfigs(virNWFilterObjListPtr nwfilters, virNWFilterObjListLoadAllConfigs(virNWFilterObjListPtr nwfilters,
const char *configDir); const char *configDir);
void void
virNWFilterObjLock(virNWFilterObjPtr obj); virNWFilterObjLock(virNWFilterObjPtr obj);
......
...@@ -962,18 +962,18 @@ virNodeDeviceObjUnlock; ...@@ -962,18 +962,18 @@ virNodeDeviceObjUnlock;
# conf/virnwfilterobj.h # conf/virnwfilterobj.h
virNWFilterObjAssignDef;
virNWFilterObjFindByName;
virNWFilterObjFindByUUID;
virNWFilterObjGetDef; virNWFilterObjGetDef;
virNWFilterObjGetNames;
virNWFilterObjGetNewDef; virNWFilterObjGetNewDef;
virNWFilterObjListAssignDef;
virNWFilterObjListExport; virNWFilterObjListExport;
virNWFilterObjListFindByName;
virNWFilterObjListFindByUUID;
virNWFilterObjListFree; virNWFilterObjListFree;
virNWFilterObjLoadAllConfigs; virNWFilterObjListGetNames;
virNWFilterObjListLoadAllConfigs;
virNWFilterObjListNumOfNWFilters;
virNWFilterObjListRemove;
virNWFilterObjLock; virNWFilterObjLock;
virNWFilterObjNumOfNWFilters;
virNWFilterObjRemove;
virNWFilterObjTestUnassignDef; virNWFilterObjTestUnassignDef;
virNWFilterObjUnlock; virNWFilterObjUnlock;
virNWFilterObjWantRemoved; virNWFilterObjWantRemoved;
......
...@@ -237,7 +237,7 @@ nwfilterStateInitialize(bool privileged, ...@@ -237,7 +237,7 @@ nwfilterStateInitialize(bool privileged,
VIR_FREE(base); VIR_FREE(base);
if (virNWFilterObjLoadAllConfigs(&driver->nwfilters, driver->configDir) < 0) if (virNWFilterObjListLoadAllConfigs(&driver->nwfilters, driver->configDir) < 0)
goto error; goto error;
nwfilterDriverUnlock(); nwfilterDriverUnlock();
...@@ -289,7 +289,7 @@ nwfilterStateReload(void) ...@@ -289,7 +289,7 @@ nwfilterStateReload(void)
virNWFilterWriteLockFilterUpdates(); virNWFilterWriteLockFilterUpdates();
virNWFilterCallbackDriversLock(); virNWFilterCallbackDriversLock();
virNWFilterObjLoadAllConfigs(&driver->nwfilters, driver->configDir); virNWFilterObjListLoadAllConfigs(&driver->nwfilters, driver->configDir);
virNWFilterCallbackDriversUnlock(); virNWFilterCallbackDriversUnlock();
virNWFilterUnlockFilterUpdates(); virNWFilterUnlockFilterUpdates();
...@@ -362,7 +362,7 @@ nwfilterLookupByUUID(virConnectPtr conn, ...@@ -362,7 +362,7 @@ nwfilterLookupByUUID(virConnectPtr conn,
virNWFilterPtr ret = NULL; virNWFilterPtr ret = NULL;
nwfilterDriverLock(); nwfilterDriverLock();
obj = virNWFilterObjFindByUUID(&driver->nwfilters, uuid); obj = virNWFilterObjListFindByUUID(&driver->nwfilters, uuid);
nwfilterDriverUnlock(); nwfilterDriverUnlock();
if (!obj) { if (!obj) {
...@@ -393,7 +393,7 @@ nwfilterLookupByName(virConnectPtr conn, ...@@ -393,7 +393,7 @@ nwfilterLookupByName(virConnectPtr conn,
virNWFilterPtr ret = NULL; virNWFilterPtr ret = NULL;
nwfilterDriverLock(); nwfilterDriverLock();
obj = virNWFilterObjFindByName(&driver->nwfilters, name); obj = virNWFilterObjListFindByName(&driver->nwfilters, name);
nwfilterDriverUnlock(); nwfilterDriverUnlock();
if (!obj) { if (!obj) {
...@@ -421,7 +421,7 @@ nwfilterConnectNumOfNWFilters(virConnectPtr conn) ...@@ -421,7 +421,7 @@ nwfilterConnectNumOfNWFilters(virConnectPtr conn)
if (virConnectNumOfNWFiltersEnsureACL(conn) < 0) if (virConnectNumOfNWFiltersEnsureACL(conn) < 0)
return -1; return -1;
return virNWFilterObjNumOfNWFilters(&driver->nwfilters, conn, return virNWFilterObjListNumOfNWFilters(&driver->nwfilters, conn,
virConnectNumOfNWFiltersCheckACL); virConnectNumOfNWFiltersCheckACL);
} }
...@@ -437,7 +437,7 @@ nwfilterConnectListNWFilters(virConnectPtr conn, ...@@ -437,7 +437,7 @@ nwfilterConnectListNWFilters(virConnectPtr conn,
return -1; return -1;
nwfilterDriverLock(); nwfilterDriverLock();
nnames = virNWFilterObjGetNames(&driver->nwfilters, conn, nnames = virNWFilterObjListGetNames(&driver->nwfilters, conn,
virConnectListNWFiltersCheckACL, virConnectListNWFiltersCheckACL,
names, maxnames); names, maxnames);
nwfilterDriverUnlock(); nwfilterDriverUnlock();
...@@ -490,13 +490,13 @@ nwfilterDefineXML(virConnectPtr conn, ...@@ -490,13 +490,13 @@ nwfilterDefineXML(virConnectPtr conn,
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0) if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
goto cleanup; goto cleanup;
if (!(obj = virNWFilterObjAssignDef(&driver->nwfilters, def))) if (!(obj = virNWFilterObjListAssignDef(&driver->nwfilters, def)))
goto cleanup; goto cleanup;
def = NULL; def = NULL;
objdef = virNWFilterObjGetDef(obj); objdef = virNWFilterObjGetDef(obj);
if (virNWFilterSaveDef(driver->configDir, objdef) < 0) { if (virNWFilterSaveDef(driver->configDir, objdef) < 0) {
virNWFilterObjRemove(&driver->nwfilters, obj); virNWFilterObjListRemove(&driver->nwfilters, obj);
goto cleanup; goto cleanup;
} }
...@@ -525,7 +525,7 @@ nwfilterUndefine(virNWFilterPtr nwfilter) ...@@ -525,7 +525,7 @@ nwfilterUndefine(virNWFilterPtr nwfilter)
virNWFilterWriteLockFilterUpdates(); virNWFilterWriteLockFilterUpdates();
virNWFilterCallbackDriversLock(); virNWFilterCallbackDriversLock();
obj = virNWFilterObjFindByUUID(&driver->nwfilters, nwfilter->uuid); obj = virNWFilterObjListFindByUUID(&driver->nwfilters, nwfilter->uuid);
if (!obj) { if (!obj) {
virReportError(VIR_ERR_NO_NWFILTER, virReportError(VIR_ERR_NO_NWFILTER,
"%s", _("no nwfilter with matching uuid")); "%s", _("no nwfilter with matching uuid"));
...@@ -546,7 +546,7 @@ nwfilterUndefine(virNWFilterPtr nwfilter) ...@@ -546,7 +546,7 @@ nwfilterUndefine(virNWFilterPtr nwfilter)
if (virNWFilterDeleteDef(driver->configDir, def) < 0) if (virNWFilterDeleteDef(driver->configDir, def) < 0)
goto cleanup; goto cleanup;
virNWFilterObjRemove(&driver->nwfilters, obj); virNWFilterObjListRemove(&driver->nwfilters, obj);
obj = NULL; obj = NULL;
ret = 0; ret = 0;
...@@ -572,7 +572,7 @@ nwfilterGetXMLDesc(virNWFilterPtr nwfilter, ...@@ -572,7 +572,7 @@ nwfilterGetXMLDesc(virNWFilterPtr nwfilter,
virCheckFlags(0, NULL); virCheckFlags(0, NULL);
nwfilterDriverLock(); nwfilterDriverLock();
obj = virNWFilterObjFindByUUID(&driver->nwfilters, nwfilter->uuid); obj = virNWFilterObjListFindByUUID(&driver->nwfilters, nwfilter->uuid);
nwfilterDriverUnlock(); nwfilterDriverUnlock();
if (!obj) { if (!obj) {
......
...@@ -60,11 +60,11 @@ static virNWFilterTechDriverPtr filter_tech_drivers[] = { ...@@ -60,11 +60,11 @@ static virNWFilterTechDriverPtr filter_tech_drivers[] = {
* to avoid lock ordering deadlocks. eg __virNWFilterInstantiateFilter * to avoid lock ordering deadlocks. eg __virNWFilterInstantiateFilter
* will hold a lock on a virNWFilterObjPtr. This in turn invokes * will hold a lock on a virNWFilterObjPtr. This in turn invokes
* virNWFilterInstantiate which invokes virNWFilterDetermineMissingVarsRec * virNWFilterInstantiate which invokes virNWFilterDetermineMissingVarsRec
* which invokes virNWFilterObjFindByName. This iterates over every single * which invokes virNWFilterObjListFindByName. This iterates over every single
* virNWFilterObjPtr in the list. So if 2 threads try to instantiate a * virNWFilterObjPtr in the list. So if 2 threads try to instantiate a
* filter in parallel, they'll both hold 1 lock at the top level in * filter in parallel, they'll both hold 1 lock at the top level in
* __virNWFilterInstantiateFilter which will cause the other thread * __virNWFilterInstantiateFilter which will cause the other thread
* to deadlock in virNWFilterObjFindByName. * to deadlock in virNWFilterObjListFindByName.
* *
* XXX better long term solution is to make virNWFilterObjList use a * XXX better long term solution is to make virNWFilterObjList use a
* hash table as is done for virDomainObjList. You can then get * hash table as is done for virDomainObjList. You can then get
...@@ -383,8 +383,8 @@ virNWFilterIncludeDefToRuleInst(virNWFilterDriverStatePtr driver, ...@@ -383,8 +383,8 @@ virNWFilterIncludeDefToRuleInst(virNWFilterDriverStatePtr driver,
int ret = -1; int ret = -1;
VIR_DEBUG("Instantiating filter %s", inc->filterref); VIR_DEBUG("Instantiating filter %s", inc->filterref);
obj = virNWFilterObjFindByName(&driver->nwfilters, obj = virNWFilterObjListFindByName(&driver->nwfilters,
inc->filterref); inc->filterref);
if (!obj) { if (!obj) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("referenced filter '%s' is missing"), _("referenced filter '%s' is missing"),
...@@ -545,7 +545,7 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter, ...@@ -545,7 +545,7 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter,
break; break;
} else if (inc) { } else if (inc) {
VIR_DEBUG("Following filter %s", inc->filterref); VIR_DEBUG("Following filter %s", inc->filterref);
obj = virNWFilterObjFindByName(&driver->nwfilters, inc->filterref); obj = virNWFilterObjListFindByName(&driver->nwfilters, inc->filterref);
if (obj) { if (obj) {
if (virNWFilterObjWantRemoved(obj)) { if (virNWFilterObjWantRemoved(obj)) {
...@@ -812,7 +812,7 @@ __virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver, ...@@ -812,7 +812,7 @@ __virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
VIR_DEBUG("filter name: %s", filtername); VIR_DEBUG("filter name: %s", filtername);
obj = virNWFilterObjFindByName(&driver->nwfilters, filtername); obj = virNWFilterObjListFindByName(&driver->nwfilters, filtername);
if (!obj) { if (!obj) {
virReportError(VIR_ERR_NO_NWFILTER, virReportError(VIR_ERR_NO_NWFILTER,
_("Could not find filter '%s'"), _("Could not find filter '%s'"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册