GP-3616 corrected DomainFileProxy.getSharedProjectURL

This commit is contained in:
ghidra1
2023-07-07 18:34:11 -04:00
parent 75fb5bf79b
commit f661d684f6
4 changed files with 173 additions and 19 deletions

View File

@@ -132,6 +132,21 @@ public class ClientUtil {
return rsa;
}
/**
* Determine if a connected {@link RepositoryServerAdapter} already exists for the specified server.
* @param host server name or address
* @param port server port, 0 indicates that default port applies.
* @return true if connection already exists, else false
*/
public static boolean isConnected(String host, int port) {
if (port <= 0) {
port = GhidraServerHandle.DEFAULT_PORT;
}
ServerInfo server = new ServerInfo(host, port);
RepositoryServerAdapter rsa = serverHandles.get(server);
return rsa != null && rsa.isConnected();
}
/**
* Eliminate the specified repository server from the connection cache
* @param host host name or IP address