mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-15 17:23:10 +09:00
Fix segfault in TM finalize action
(cherry picked from commit 6cee0680b9)
This commit is contained in:
1 parent
a875246109
commit
bbfde81215
1 file changed
+22
-9
@@ -165,6 +165,15 @@ void TransferManager::do_action(const string &action, void * arg)
|
||||
|
||||
delete static_cast<int *>(arg);
|
||||
|
||||
if (action == ACTION_FINALIZE)
|
||||
{
|
||||
NebulaLog::log("TrM",Log::INFO,"Stopping Transfer Manager...");
|
||||
|
||||
MadManager::stop();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
vm = vmpool->get(vid,true);
|
||||
|
||||
if (vm == 0)
|
||||
@@ -172,10 +181,20 @@ void TransferManager::do_action(const string &action, void * arg)
|
||||
return;
|
||||
}
|
||||
|
||||
hid = vm->get_hid();
|
||||
vm->unlock();
|
||||
if (vm->hasHistory())
|
||||
{
|
||||
hid = vm->get_hid();
|
||||
|
||||
host = hpool->get(hid,true);
|
||||
vm->unlock();
|
||||
|
||||
host = hpool->get(hid,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
vm->unlock();
|
||||
|
||||
host = 0;
|
||||
}
|
||||
|
||||
if ( host == 0)
|
||||
{
|
||||
@@ -334,12 +353,6 @@ void TransferManager::do_action(const string &action, void * arg)
|
||||
{
|
||||
driver_cancel_action(vid);
|
||||
}
|
||||
else if (action == ACTION_FINALIZE)
|
||||
{
|
||||
NebulaLog::log("TrM",Log::INFO,"Stopping Transfer Manager...");
|
||||
|
||||
MadManager::stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
ostringstream oss;
|
||||
|
||||
Reference in new issue
Block a user