mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-22 22:03:39 +03:00
bug-1669: Wrong condition checks in some files. Makes some string treatment case-senitive, as opposed
with the convenction in OpenNebula (strings are *not* case sensitive)
This commit is contained in:
parent
f726a65309
commit
d22567fe23
@ -43,7 +43,7 @@ public:
|
||||
|
||||
policy(vm);
|
||||
|
||||
if(priority.empty()!=true)
|
||||
if(!priority.empty())
|
||||
{
|
||||
sw.max = fabs(*max_element(
|
||||
priority.begin(),
|
||||
|
@ -334,10 +334,7 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
|
||||
// ---- Disk type and source for the image ----
|
||||
|
||||
if (type.empty() == false)
|
||||
{
|
||||
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
|
||||
}
|
||||
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
|
||||
|
||||
if ( type == "BLOCK" )
|
||||
{
|
||||
@ -548,13 +545,10 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
passwd = graphics->vector_value("PASSWD");
|
||||
keymap = graphics->vector_value("KEYMAP");
|
||||
|
||||
if (type.empty() != false)
|
||||
{
|
||||
transform(type.begin(),
|
||||
type.end(),
|
||||
type.begin(),
|
||||
(int(*)(int))tolower);
|
||||
}
|
||||
transform(type.begin(),
|
||||
type.end(),
|
||||
type.begin(),
|
||||
(int(*)(int))tolower);
|
||||
|
||||
if ( type == "vnc" || type == "spice" )
|
||||
{
|
||||
|
@ -214,10 +214,7 @@ int LibVirtDriver::deployment_description_vmware(
|
||||
}
|
||||
}
|
||||
|
||||
if (type.empty() == false)
|
||||
{
|
||||
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
|
||||
}
|
||||
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
|
||||
|
||||
// ---- Disk type and source for the image ----
|
||||
|
||||
|
@ -248,10 +248,7 @@ int XenDriver::deployment_description(
|
||||
goto error_disk;
|
||||
}
|
||||
|
||||
if (type.empty() == false)
|
||||
{
|
||||
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
|
||||
}
|
||||
transform(type.begin(),type.end(),type.begin(),(int(*)(int))toupper);
|
||||
|
||||
mode = "w";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user