Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fix to Spice Server to accept clients with version nums >=3.5.*.* #780

Merged
merged 1 commit into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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