mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
port allocator: remove release functionality from set used
Let's use virPortAllocatorRelease instead of virPortAllocatorSetUsed(false). Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
1 parent
4c9c7a5ba2
commit
5dbda5e972
7 files changed
+21
-39
No files matched your search
@@ -93,12 +93,8 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
out:
|
||||
if (vmdef &&
|
||||
vmdef->ngraphics == 1 &&
|
||||
vmdef->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
|
||||
if (vmdef->graphics[0]->data.vnc.autoport)
|
||||
virPortAllocatorRelease(vmdef->graphics[0]->data.vnc.port);
|
||||
else
|
||||
virPortAllocatorSetUsed(vmdef->graphics[0]->data.vnc.port, false);
|
||||
}
|
||||
vmdef->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC)
|
||||
virPortAllocatorRelease(vmdef->graphics[0]->data.vnc.port);
|
||||
|
||||
VIR_FREE(actualargv);
|
||||
VIR_FREE(actualld);
|
||||
|
||||
@@ -113,12 +113,8 @@ testCompareXMLToDomConfig(const char *xmlfile,
|
||||
cleanup:
|
||||
if (vmdef &&
|
||||
vmdef->ngraphics == 1 &&
|
||||
vmdef->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
|
||||
if (vmdef->graphics[0]->data.vnc.autoport)
|
||||
virPortAllocatorRelease(vmdef->graphics[0]->data.vnc.port);
|
||||
else
|
||||
virPortAllocatorSetUsed(vmdef->graphics[0]->data.vnc.port, false);
|
||||
}
|
||||
vmdef->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC)
|
||||
virPortAllocatorRelease(vmdef->graphics[0]->data.vnc.port);
|
||||
|
||||
VIR_FREE(expectjson);
|
||||
VIR_FREE(actualjson);
|
||||
|
||||
Reference in new issue
Block a user