1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

permitting client to communicate with old dstore servers (7.x, internal IBM RSE)

This commit is contained in:
David McKnight 2007-10-11 16:06:09 +00:00
parent 80ffbb4b26
commit d45ddd11c8

View file

@ -873,19 +873,22 @@ public class ClientConnection
}
else if (serverVersionStr[VERSION_INDEX_PROTOCOL].equals(clientVersionStr[VERSION_INDEX_PROTOCOL]))
{
if (_dataStore.getServerVersion()== _clientVersion)
if (_clientVersion == 0)
{
_clientVersion = Integer.parseInt(clientVersionStr[VERSION_INDEX_VERSION]);
}
int serverVersion = _dataStore.getServerVersion();
if (serverVersion== _clientVersion)
{
// major versions match so should be compatible
return HANDSHAKE_CORRECT;
}
else
{
if (_dataStore.getServerVersion()> _clientVersion)
if (serverVersion > _clientVersion)
{
// newer server
if (_dataStore.getServerVersion() - 1 == _clientVersion)
if (serverVersion - 1 == _clientVersion)
{
return HANDSHAKE_SERVER_RECENT_NEWER;
}
@ -897,10 +900,16 @@ public class ClientConnection
else
{
// newer client
if (_dataStore.getServerVersion() + 1 == _clientVersion)
if (serverVersion + 1 == _clientVersion)
{
return HANDSHAKE_SERVER_RECENT_OLDER;
}
else if (serverVersion + 2 == _clientVersion)
{
// TODO we shouldn't be allowing this but
// wanting to see if old (non-open RSE server still works with open RSE)
return HANDSHAKE_SERVER_RECENT_OLDER;
}
else
{
return HANDSHAKE_SERVER_OLDER;