Skip to content

Commit

Permalink
Added fix to Spice Server to accept clients with version nums >=3.5.*…
Browse files Browse the repository at this point in the history
….* (#780)
  • Loading branch information
Tyler Wilson authored and scsides committed Feb 13, 2019
1 parent 4a76370 commit ee65fb7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
17 changes: 11 additions & 6 deletions isis/src/base/apps/spiceserver/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion isis/src/base/apps/spiceserver/spiceserver.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<application name="spiceserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd">
<application name="spiceserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd">
<brief>
Spiceinit Server
</brief>
Expand Down Expand Up @@ -50,6 +51,10 @@
<change name="Makayla Shepherd" date="2015-09-08">
Modified to open the temporary cube correctly. Fixes #2213.
</change>
<change name="Tyler Wilson" date="2019-02-11">
Modified the version check. Now all versions of ISIS3 >= 3.5.*.* will be acceptable
to the application.
</change>
</history>

<groups>
Expand Down

0 comments on commit ee65fb7

Please sign in to comment.