diff options
author | Nito Martinez <Nito@Qindel.ES> | 2015-02-13 13:26:27 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-13 13:26:27 +0100 |
commit | d4d3fe0e6e77a58e68defc5895a589a681d7d092 (patch) | |
tree | 3e8197ea66ca8dc9fbac1275a9c6efaa8f7f6a35 /nxcomp/Control.cpp | |
parent | fea8fb5aeeeb77ecfd3e98791bd6f77a9782b588 (diff) | |
download | nx-libs-d4d3fe0e6e77a58e68defc5895a589a681d7d092.tar.gz nx-libs-d4d3fe0e6e77a58e68defc5895a589a681d7d092.tar.bz2 nx-libs-d4d3fe0e6e77a58e68defc5895a589a681d7d092.zip |
Allow version 4-digit version comparison/handshake (400_nxcomp-version.full+lite.patch).
Diffstat (limited to 'nxcomp/Control.cpp')
-rw-r--r-- | nxcomp/Control.cpp | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/nxcomp/Control.cpp b/nxcomp/Control.cpp index ce99567d7..062654235 100644 --- a/nxcomp/Control.cpp +++ b/nxcomp/Control.cpp @@ -15,6 +15,7 @@ /* */ /**************************************************************************/ +#include "NX.h" #include "NXpack.h" #include "Control.h" @@ -594,44 +595,17 @@ Control::Control() RemoteVersionMajor = -1; RemoteVersionMinor = -1; RemoteVersionPatch = -1; + RemoteVersionMaintenancePatch = -1; CompatVersionMajor = -1; CompatVersionMinor = -1; CompatVersionPatch = -1; + CompatVersionMaintenancePatch = -1; - char version[32]; - - strcpy(version, VERSION); - - char *value; - - value = strtok(version, "."); - - for (int i = 0; value != NULL && i < 3; i++) - { - switch (i) - { - case 0: - - LocalVersionMajor = atoi(value); - - break; - - case 1: - - LocalVersionMinor = atoi(value); - - break; - - case 2: - - LocalVersionPatch = atoi(value); - - break; - } - - value = strtok(NULL, "."); - } + LocalVersionMajor = NXMajorVersion(); + LocalVersionMinor = NXMinorVersion(); + LocalVersionPatch = NXPatchVersion(); + LocalVersionMaintenancePatch = NXMaintenancePatchVersion(); #ifdef TEST *logofs << "Control: Major version is " << LocalVersionMajor |