mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Bug #2045: wrap around the vnc port number
(cherry picked from commit 005aa35739ac1b2ebe8646fc21283e75b8b5f785)
This commit is contained in:
parent
e27a5b9a7e
commit
7d128316f5
@ -909,11 +909,13 @@ void VirtualMachine::parse_graphics()
|
||||
int base_port;
|
||||
string base_port_s;
|
||||
|
||||
int limit = 65535;
|
||||
|
||||
nd.get_configuration_attribute("VNC_BASE_PORT",base_port_s);
|
||||
iss.str(base_port_s);
|
||||
iss >> base_port;
|
||||
|
||||
oss << ( base_port + oid );
|
||||
oss << ( base_port + ( oid % (limit - base_port) ));
|
||||
graphics->replace("PORT", oss.str());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user