From ee65fb7a3a3c157abd2af8bbc31fbe16dae75aff Mon Sep 17 00:00:00 2001 From: Tyler Wilson Date: Tue, 12 Feb 2019 17:36:09 -0700 Subject: [PATCH] Added fix to Spice Server to accept clients with version nums >=3.5.*.* (#780) --- isis/src/base/apps/spiceserver/main.cpp | 17 +++++++++++------ isis/src/base/apps/spiceserver/spiceserver.xml | 7 ++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/isis/src/base/apps/spiceserver/main.cpp b/isis/src/base/apps/spiceserver/main.cpp index 1e4639207a..c28148b5f4 100644 --- a/isis/src/base/apps/spiceserver/main.cpp +++ b/isis/src/base/apps/spiceserver/main.cpp @@ -149,13 +149,18 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } - if ( ui.GetBoolean("CHECKVERSION") && otherVersion != Application::Version() ) { - QString msg = "The SPICE server only supports the latest Isis version [" + - Application::Version() + "], version [" + otherVersion + - "] is not compatible"; - throw IException(IException::User, msg, _FILEINFO_); - } + if (ui.GetBoolean("CHECKVERSION") ) { + QStringList remoteVersion = otherVersion.split(QRegExp("\\s+"))[0].split(QRegExp("\\.")); + if ( remoteVersion[1].toInt() < 5) { + + QString msg ="The SPICE server only supports Isis versions greater than or equal to 3.5.*.*."; + msg += "Your version: [" + otherVersion + "] is not compatible"; + throw IException(IException::User, msg, _FILEINFO_); + + } + + } // This next section looks a lot like spiceinit, its semi-duplicated because // I did not want users to be able to spiceinit a label without cube // data. diff --git a/isis/src/base/apps/spiceserver/spiceserver.xml b/isis/src/base/apps/spiceserver/spiceserver.xml index af5d520959..0ab63bc58f 100644 --- a/isis/src/base/apps/spiceserver/spiceserver.xml +++ b/isis/src/base/apps/spiceserver/spiceserver.xml @@ -1,6 +1,7 @@ - + Spiceinit Server @@ -50,6 +51,10 @@ Modified to open the temporary cube correctly. Fixes #2213. + + Modified the version check. Now all versions of ISIS3 >= 3.5.*.* will be acceptable + to the application. +