randomize Mock Auto device port to avoid collisions when multiple guh's are running
This commit is contained in:
parent
431322199b
commit
fb779ad15f
@ -274,7 +274,9 @@ void DevicePluginMock::startMonitoringAutoDevices()
|
||||
DeviceDescriptor mockDescriptor(mockDeviceAutoClassId, "Mock Device (Auto created)");
|
||||
|
||||
ParamList params;
|
||||
Param param("httpport", 4242);
|
||||
qsrand(QDateTime::currentMSecsSinceEpoch());
|
||||
int port = 4242 + (qrand() % 1000);
|
||||
Param param("httpport", port);
|
||||
params.append(param);
|
||||
mockDescriptor.setParams(params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user