Refactor RemoteHost to be copyable with shared storage

* This allows RemoteHost handles to still be valid and usable (if returning
  empty data) when they are deleted/removed if the device is disconnected, as
  well as providing better multi-thread access (they lock internally)
This commit is contained in:
baldurk
2019-07-30 16:20:09 +01:00
parent da289fdbcc
commit 06f2e61b8f
15 changed files with 626 additions and 355 deletions
+4 -3
View File
@@ -312,10 +312,11 @@ int main(int argc, char *argv[])
int replayHostIndex = -1;
if(parser.isSet(replayhost))
{
QString replayHost = parser.value(replayhost);
for(int i = 0; i < config.RemoteHosts.count(); i++)
rdcstr replayHost = parser.value(replayhost);
rdcarray<RemoteHost> hosts = config.GetRemoteHosts();
for(int i = 0; i < hosts.count(); i++)
{
if(QString(config.RemoteHosts[i]->hostname) == replayHost)
if(hosts[i].Hostname() == replayHost)
{
replayHostIndex = i;
break;