1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Feature #1739: Decode the host poll info string also in case of error

This commit is contained in:
Carlos Martín 2013-02-13 19:10:37 +01:00
parent 2ea768842b
commit 6de3545710

View File

@ -56,6 +56,9 @@ void InformationManagerDriver::protocol(
set<int> vm_ids;
string hinfo64;
string* hinfo;
// Parse the driver message
if ( is.good() )
@ -102,14 +105,16 @@ void InformationManagerDriver::protocol(
vm_ids = host->get_running_vms();
getline (is, hinfo64);
hinfo = one_util::base64_decode(hinfo64);
if (result != "SUCCESS")
{
goto error_driver_info;
}
int rc;
string hinfo64;
string* hinfo;
ostringstream oss;
@ -121,10 +126,6 @@ void InformationManagerDriver::protocol(
vector<Attribute*> vm_att;
vector<Attribute*>::iterator it;
getline (is, hinfo64);
hinfo = one_util::base64_decode(hinfo64);
oss << "Host " << id << " successfully monitored.";
NebulaLog::log("InM", Log::DEBUG, oss);
@ -267,7 +268,9 @@ void InformationManagerDriver::protocol(
return;
error_driver_info:
ess << "Error monitoring host " << id << " : " << is.str();
ess << "Error monitoring host " << id << " : " << *hinfo;
delete hinfo;
for (set<int>::iterator it = vm_ids.begin(); it != vm_ids.end(); it++)
{