From 9b8487ec049fd15fa38a36480521d5495c4ada7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Czern=C3=BD?= Date: Fri, 16 Sep 2022 11:30:26 +0200 Subject: [PATCH] B #5960: Do not release VNC port if undeploy fails (#2272) --- src/lcm/LifeCycleActions.cc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/lcm/LifeCycleActions.cc b/src/lcm/LifeCycleActions.cc index 9f3426bc99..b60b47912e 100644 --- a/src/lcm/LifeCycleActions.cc +++ b/src/lcm/LifeCycleActions.cc @@ -556,7 +556,6 @@ void LifeCycleManager::trigger_undeploy(int vid, bool hard, int req_id = ra.req_id; trigger([this, hard, vid, uid, gid, req_id] { - unsigned int port; auto vm = vmpool->get(vid); if ( vm == nullptr ) @@ -602,14 +601,6 @@ void LifeCycleManager::trigger_undeploy(int vid, bool hard, vmm->trigger_shutdown(vid); } - VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS"); - - if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0)) - { - graphics->remove("PORT"); - clpool->release_vnc_port(vm->get_cid(), port); - } - vmpool->update_history(vm.get()); vmpool->update(vm.get());