mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 11:01:19 +00:00
nwfilter: Use consistent naming for variables
When processing a virNWFilterPtr use 'nwfilter' as a variable name. When processing a virNWFilterObjPtr use 'obj' as a variable name. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
b63de148a4
commit
82769c4fdc
@ -62,15 +62,15 @@ virNWFilterObjListFree(virNWFilterObjListPtr nwfilters)
|
|||||||
|
|
||||||
void
|
void
|
||||||
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
|
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
|
||||||
virNWFilterObjPtr nwfilter)
|
virNWFilterObjPtr obj)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
|
|
||||||
for (i = 0; i < nwfilters->count; i++) {
|
for (i = 0; i < nwfilters->count; i++) {
|
||||||
virNWFilterObjLock(nwfilters->objs[i]);
|
virNWFilterObjLock(nwfilters->objs[i]);
|
||||||
if (nwfilters->objs[i] == nwfilter) {
|
if (nwfilters->objs[i] == obj) {
|
||||||
virNWFilterObjUnlock(nwfilters->objs[i]);
|
virNWFilterObjUnlock(nwfilters->objs[i]);
|
||||||
virNWFilterObjFree(nwfilters->objs[i]);
|
virNWFilterObjFree(nwfilters->objs[i]);
|
||||||
|
|
||||||
@ -174,16 +174,16 @@ virNWFilterObjDefLoopDetect(virNWFilterObjListPtr nwfilters,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virNWFilterObjTestUnassignDef(virNWFilterObjPtr nwfilter)
|
virNWFilterObjTestUnassignDef(virNWFilterObjPtr obj)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
nwfilter->wantRemoved = 1;
|
obj->wantRemoved = 1;
|
||||||
/* trigger the update on VMs referencing the filter */
|
/* trigger the update on VMs referencing the filter */
|
||||||
if (virNWFilterTriggerVMFilterRebuild())
|
if (virNWFilterTriggerVMFilterRebuild())
|
||||||
rc = -1;
|
rc = -1;
|
||||||
|
|
||||||
nwfilter->wantRemoved = 0;
|
obj->wantRemoved = 0;
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -225,29 +225,29 @@ virNWFilterObjPtr
|
|||||||
virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
|
virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
|
||||||
virNWFilterDefPtr def)
|
virNWFilterDefPtr def)
|
||||||
{
|
{
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
|
|
||||||
nwfilter = virNWFilterObjFindByUUID(nwfilters, def->uuid);
|
obj = virNWFilterObjFindByUUID(nwfilters, def->uuid);
|
||||||
|
|
||||||
if (nwfilter) {
|
if (obj) {
|
||||||
if (STRNEQ(def->name, nwfilter->def->name)) {
|
if (STRNEQ(def->name, obj->def->name)) {
|
||||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||||
_("filter with same UUID but different name "
|
_("filter with same UUID but different name "
|
||||||
"('%s') already exists"),
|
"('%s') already exists"),
|
||||||
nwfilter->def->name);
|
obj->def->name);
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
} else {
|
} else {
|
||||||
nwfilter = virNWFilterObjFindByName(nwfilters, def->name);
|
obj = virNWFilterObjFindByName(nwfilters, def->name);
|
||||||
if (nwfilter) {
|
if (obj) {
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||||
virUUIDFormat(nwfilter->def->uuid, uuidstr);
|
virUUIDFormat(obj->def->uuid, uuidstr);
|
||||||
virReportError(VIR_ERR_OPERATION_FAILED,
|
virReportError(VIR_ERR_OPERATION_FAILED,
|
||||||
_("filter '%s' already exists with uuid %s"),
|
_("filter '%s' already exists with uuid %s"),
|
||||||
def->name, uuidstr);
|
def->name, uuidstr);
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,49 +259,49 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((nwfilter = virNWFilterObjFindByName(nwfilters, def->name))) {
|
if ((obj = virNWFilterObjFindByName(nwfilters, def->name))) {
|
||||||
|
|
||||||
if (virNWFilterDefEqual(def, nwfilter->def, false)) {
|
if (virNWFilterDefEqual(def, obj->def, false)) {
|
||||||
virNWFilterDefFree(nwfilter->def);
|
virNWFilterDefFree(obj->def);
|
||||||
nwfilter->def = def;
|
obj->def = def;
|
||||||
return nwfilter;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
nwfilter->newDef = def;
|
obj->newDef = def;
|
||||||
/* trigger the update on VMs referencing the filter */
|
/* trigger the update on VMs referencing the filter */
|
||||||
if (virNWFilterTriggerVMFilterRebuild()) {
|
if (virNWFilterTriggerVMFilterRebuild()) {
|
||||||
nwfilter->newDef = NULL;
|
obj->newDef = NULL;
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
virNWFilterDefFree(nwfilter->def);
|
virNWFilterDefFree(obj->def);
|
||||||
nwfilter->def = def;
|
obj->def = def;
|
||||||
nwfilter->newDef = NULL;
|
obj->newDef = NULL;
|
||||||
return nwfilter;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(nwfilter) < 0)
|
if (VIR_ALLOC(obj) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (virMutexInitRecursive(&nwfilter->lock) < 0) {
|
if (virMutexInitRecursive(&obj->lock) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
"%s", _("cannot initialize mutex"));
|
"%s", _("cannot initialize mutex"));
|
||||||
VIR_FREE(nwfilter);
|
VIR_FREE(obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
virNWFilterObjLock(nwfilter);
|
virNWFilterObjLock(obj);
|
||||||
nwfilter->active = 0;
|
obj->active = 0;
|
||||||
|
|
||||||
if (VIR_APPEND_ELEMENT_COPY(nwfilters->objs,
|
if (VIR_APPEND_ELEMENT_COPY(nwfilters->objs,
|
||||||
nwfilters->count, nwfilter) < 0) {
|
nwfilters->count, obj) < 0) {
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
virNWFilterObjFree(nwfilter);
|
virNWFilterObjFree(obj);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
nwfilter->def = def;
|
obj->def = def;
|
||||||
|
|
||||||
return nwfilter;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters,
|
|||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
virNWFilterDefPtr def = NULL;
|
virNWFilterDefPtr def = NULL;
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
char *configFile = NULL;
|
char *configFile = NULL;
|
||||||
|
|
||||||
if (!(configFile = virFileBuildPath(configDir, name, ".xml")))
|
if (!(configFile = virFileBuildPath(configDir, name, ".xml")))
|
||||||
@ -436,11 +436,11 @@ virNWFilterObjLoadConfig(virNWFilterObjListPtr nwfilters,
|
|||||||
virNWFilterSaveConfig(configDir, def) < 0)
|
virNWFilterSaveConfig(configDir, def) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!(nwfilter = virNWFilterObjAssignDef(nwfilters, def)))
|
if (!(obj = virNWFilterObjAssignDef(nwfilters, def)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
VIR_FREE(configFile);
|
VIR_FREE(configFile);
|
||||||
return nwfilter;
|
return obj;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(configFile);
|
VIR_FREE(configFile);
|
||||||
@ -462,14 +462,14 @@ virNWFilterObjLoadAllConfigs(virNWFilterObjListPtr nwfilters,
|
|||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
|
|
||||||
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
if (!virFileStripSuffix(entry->d_name, ".xml"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
nwfilter = virNWFilterObjLoadConfig(nwfilters, configDir, entry->d_name);
|
obj = virNWFilterObjLoadConfig(nwfilters, configDir, entry->d_name);
|
||||||
if (nwfilter)
|
if (obj)
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_DIR_CLOSE(dir);
|
VIR_DIR_CLOSE(dir);
|
||||||
|
@ -62,9 +62,10 @@ virNWFilterObjListFree(virNWFilterObjListPtr nwfilters);
|
|||||||
|
|
||||||
void
|
void
|
||||||
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
|
virNWFilterObjRemove(virNWFilterObjListPtr nwfilters,
|
||||||
virNWFilterObjPtr nwfilter);
|
virNWFilterObjPtr obj);
|
||||||
|
|
||||||
void virNWFilterObjFree(virNWFilterObjPtr obj);
|
void
|
||||||
|
virNWFilterObjFree(virNWFilterObjPtr obj);
|
||||||
|
|
||||||
virNWFilterObjPtr
|
virNWFilterObjPtr
|
||||||
virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters,
|
virNWFilterObjFindByUUID(virNWFilterObjListPtr nwfilters,
|
||||||
@ -79,7 +80,7 @@ virNWFilterObjAssignDef(virNWFilterObjListPtr nwfilters,
|
|||||||
virNWFilterDefPtr def);
|
virNWFilterDefPtr def);
|
||||||
|
|
||||||
int
|
int
|
||||||
virNWFilterObjTestUnassignDef(virNWFilterObjPtr nwfilter);
|
virNWFilterObjTestUnassignDef(virNWFilterObjPtr obj);
|
||||||
|
|
||||||
typedef bool
|
typedef bool
|
||||||
(*virNWFilterObjListFilter)(virConnectPtr conn,
|
(*virNWFilterObjListFilter)(virConnectPtr conn,
|
||||||
|
@ -357,27 +357,27 @@ static virNWFilterPtr
|
|||||||
nwfilterLookupByUUID(virConnectPtr conn,
|
nwfilterLookupByUUID(virConnectPtr conn,
|
||||||
const unsigned char *uuid)
|
const unsigned char *uuid)
|
||||||
{
|
{
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
virNWFilterPtr ret = NULL;
|
virNWFilterPtr ret = NULL;
|
||||||
|
|
||||||
nwfilterDriverLock();
|
nwfilterDriverLock();
|
||||||
nwfilter = virNWFilterObjFindByUUID(&driver->nwfilters, uuid);
|
obj = virNWFilterObjFindByUUID(&driver->nwfilters, uuid);
|
||||||
nwfilterDriverUnlock();
|
nwfilterDriverUnlock();
|
||||||
|
|
||||||
if (!nwfilter) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NWFILTER,
|
virReportError(VIR_ERR_NO_NWFILTER,
|
||||||
"%s", _("no nwfilter with matching uuid"));
|
"%s", _("no nwfilter with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virNWFilterLookupByUUIDEnsureACL(conn, nwfilter->def) < 0)
|
if (virNWFilterLookupByUUIDEnsureACL(conn, obj->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virGetNWFilter(conn, nwfilter->def->name, nwfilter->def->uuid);
|
ret = virGetNWFilter(conn, obj->def->name, obj->def->uuid);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nwfilter)
|
if (obj)
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -386,27 +386,27 @@ static virNWFilterPtr
|
|||||||
nwfilterLookupByName(virConnectPtr conn,
|
nwfilterLookupByName(virConnectPtr conn,
|
||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
virNWFilterPtr ret = NULL;
|
virNWFilterPtr ret = NULL;
|
||||||
|
|
||||||
nwfilterDriverLock();
|
nwfilterDriverLock();
|
||||||
nwfilter = virNWFilterObjFindByName(&driver->nwfilters, name);
|
obj = virNWFilterObjFindByName(&driver->nwfilters, name);
|
||||||
nwfilterDriverUnlock();
|
nwfilterDriverUnlock();
|
||||||
|
|
||||||
if (!nwfilter) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NWFILTER,
|
virReportError(VIR_ERR_NO_NWFILTER,
|
||||||
_("no nwfilter with matching name '%s'"), name);
|
_("no nwfilter with matching name '%s'"), name);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virNWFilterLookupByNameEnsureACL(conn, nwfilter->def) < 0)
|
if (virNWFilterLookupByNameEnsureACL(conn, obj->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virGetNWFilter(conn, nwfilter->def->name, nwfilter->def->uuid);
|
ret = virGetNWFilter(conn, obj->def->name, obj->def->uuid);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nwfilter)
|
if (obj)
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,7 +466,7 @@ nwfilterDefineXML(virConnectPtr conn,
|
|||||||
const char *xml)
|
const char *xml)
|
||||||
{
|
{
|
||||||
virNWFilterDefPtr def;
|
virNWFilterDefPtr def;
|
||||||
virNWFilterObjPtr nwfilter = NULL;
|
virNWFilterObjPtr obj = NULL;
|
||||||
virNWFilterPtr ret = NULL;
|
virNWFilterPtr ret = NULL;
|
||||||
|
|
||||||
if (!driver->privileged) {
|
if (!driver->privileged) {
|
||||||
@ -485,22 +485,22 @@ nwfilterDefineXML(virConnectPtr conn,
|
|||||||
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
|
if (virNWFilterDefineXMLEnsureACL(conn, def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(nwfilter = virNWFilterObjAssignDef(&driver->nwfilters, def)))
|
if (!(obj = virNWFilterObjAssignDef(&driver->nwfilters, def)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virNWFilterSaveDef(driver->configDir, def) < 0) {
|
if (virNWFilterSaveDef(driver->configDir, def) < 0) {
|
||||||
virNWFilterObjRemove(&driver->nwfilters, nwfilter);
|
virNWFilterObjRemove(&driver->nwfilters, obj);
|
||||||
def = NULL;
|
def = NULL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
def = NULL;
|
def = NULL;
|
||||||
|
|
||||||
ret = virGetNWFilter(conn, nwfilter->def->name, nwfilter->def->uuid);
|
ret = virGetNWFilter(conn, obj->def->name, obj->def->uuid);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
virNWFilterDefFree(def);
|
virNWFilterDefFree(def);
|
||||||
if (nwfilter)
|
if (obj)
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
|
|
||||||
virNWFilterCallbackDriversUnlock();
|
virNWFilterCallbackDriversUnlock();
|
||||||
virNWFilterUnlockFilterUpdates();
|
virNWFilterUnlockFilterUpdates();
|
||||||
@ -510,42 +510,42 @@ nwfilterDefineXML(virConnectPtr conn,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
nwfilterUndefine(virNWFilterPtr obj)
|
nwfilterUndefine(virNWFilterPtr nwfilter)
|
||||||
{
|
{
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
nwfilterDriverLock();
|
nwfilterDriverLock();
|
||||||
virNWFilterWriteLockFilterUpdates();
|
virNWFilterWriteLockFilterUpdates();
|
||||||
virNWFilterCallbackDriversLock();
|
virNWFilterCallbackDriversLock();
|
||||||
|
|
||||||
nwfilter = virNWFilterObjFindByUUID(&driver->nwfilters, obj->uuid);
|
obj = virNWFilterObjFindByUUID(&driver->nwfilters, nwfilter->uuid);
|
||||||
if (!nwfilter) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NWFILTER,
|
virReportError(VIR_ERR_NO_NWFILTER,
|
||||||
"%s", _("no nwfilter with matching uuid"));
|
"%s", _("no nwfilter with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virNWFilterUndefineEnsureACL(obj->conn, nwfilter->def) < 0)
|
if (virNWFilterUndefineEnsureACL(nwfilter->conn, obj->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virNWFilterObjTestUnassignDef(nwfilter) < 0) {
|
if (virNWFilterObjTestUnassignDef(obj) < 0) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s",
|
"%s",
|
||||||
_("nwfilter is in use"));
|
_("nwfilter is in use"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virNWFilterDeleteDef(driver->configDir, nwfilter->def) < 0)
|
if (virNWFilterDeleteDef(driver->configDir, obj->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virNWFilterObjRemove(&driver->nwfilters, nwfilter);
|
virNWFilterObjRemove(&driver->nwfilters, obj);
|
||||||
nwfilter = NULL;
|
obj = NULL;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nwfilter)
|
if (obj)
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
|
|
||||||
virNWFilterCallbackDriversUnlock();
|
virNWFilterCallbackDriversUnlock();
|
||||||
virNWFilterUnlockFilterUpdates();
|
virNWFilterUnlockFilterUpdates();
|
||||||
@ -555,32 +555,32 @@ nwfilterUndefine(virNWFilterPtr obj)
|
|||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
nwfilterGetXMLDesc(virNWFilterPtr obj,
|
nwfilterGetXMLDesc(virNWFilterPtr nwfilter,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virNWFilterObjPtr nwfilter;
|
virNWFilterObjPtr obj;
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
|
|
||||||
virCheckFlags(0, NULL);
|
virCheckFlags(0, NULL);
|
||||||
|
|
||||||
nwfilterDriverLock();
|
nwfilterDriverLock();
|
||||||
nwfilter = virNWFilterObjFindByUUID(&driver->nwfilters, obj->uuid);
|
obj = virNWFilterObjFindByUUID(&driver->nwfilters, nwfilter->uuid);
|
||||||
nwfilterDriverUnlock();
|
nwfilterDriverUnlock();
|
||||||
|
|
||||||
if (!nwfilter) {
|
if (!obj) {
|
||||||
virReportError(VIR_ERR_NO_NWFILTER,
|
virReportError(VIR_ERR_NO_NWFILTER,
|
||||||
"%s", _("no nwfilter with matching uuid"));
|
"%s", _("no nwfilter with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virNWFilterGetXMLDescEnsureACL(obj->conn, nwfilter->def) < 0)
|
if (virNWFilterGetXMLDescEnsureACL(nwfilter->conn, obj->def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
ret = virNWFilterDefFormat(nwfilter->def);
|
ret = virNWFilterDefFormat(obj->def);
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (nwfilter)
|
if (obj)
|
||||||
virNWFilterObjUnlock(nwfilter);
|
virNWFilterObjUnlock(obj);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user