@@ -55,7 +55,7 @@ IPropertyTree* CTpWrapper::getEnvironment(const char* xpath)
55
55
}
56
56
57
57
void CTpWrapper::getClusterMachineList (double clientVersion,
58
- const char * ClusterType,
58
+ CTpMachineType ClusterType,
59
59
const char * ClusterPath,
60
60
const char * ClusterDirectory,
61
61
IArrayOf<IEspTpMachine> &MachineList,
@@ -68,7 +68,7 @@ void CTpWrapper::getClusterMachineList(double clientVersion,
68
68
getAttPath (ClusterPath,path);
69
69
set<string> machineNames; // used for checking duplicates
70
70
71
- if (strcmp (eqTHORMACHINES, ClusterType) == 0 )
71
+ if (ClusterType == CTpMachineType_Thor )
72
72
{
73
73
bool multiSlaves = false ;
74
74
getMachineList (clientVersion, eqThorMasterProcess, path.str (), " " , ClusterDirectory, MachineList);
@@ -81,41 +81,41 @@ void CTpWrapper::getClusterMachineList(double clientVersion,
81
81
if (!checkMultiSlavesFlag (ClusterName) &&(count < MachineList.length ()))
82
82
hasThorSpareProcess = true ;
83
83
}
84
- else if (strcmp (eqHOLEMACHINES, ClusterType) == 0 )
84
+ else if (ClusterType == CTpMachineType_Hole )
85
85
{
86
86
getMachineList (clientVersion, eqHoleSocketProcess, path.str (), " " , ClusterDirectory, MachineList);
87
87
getMachineList (clientVersion, eqHoleProcessorProcess, path.str (), " " , ClusterDirectory, MachineList);
88
88
getMachineList (clientVersion, eqHoleControlProcess, path.str (), " " , ClusterDirectory, MachineList);
89
89
getMachineList (clientVersion, eqHoleCollatorProcess, path.str (), " " , ClusterDirectory, MachineList);
90
90
getMachineList (clientVersion, eqHoleStandbyProcess, path.str (), " " , ClusterDirectory, MachineList);
91
91
}
92
- else if (strcmp (eqROXIEMACHINES, ClusterType) == 0 )
92
+ else if (ClusterType == CTpMachineType_Roxie )
93
93
{
94
94
getMachineList (clientVersion, " RoxieServerProcess" , path.str (), " " , ClusterDirectory, MachineList, &machineNames);
95
95
}
96
- else if (strcmp (eqMACHINES, ClusterType) == 0 )
96
+ else if (ClusterType == CTpMachineType_Machines )
97
97
{
98
98
// load a list of available machines.......
99
99
getMachineList (clientVersion, " Computer" , " /Environment/Hardware" , " " , ClusterDirectory, MachineList);
100
100
}
101
- else if (strcmp ( " AVAILABLEMACHINES " , ClusterType) == 0 )
101
+ else if (ClusterType == CTpMachineType_Available )
102
102
{
103
103
getMachineList (clientVersion, " Computer" , " /Environment/Hardware" , eqMachineAvailablability, ClusterDirectory, MachineList);
104
104
}
105
- else if (strcmp ( " DROPZONE " , ClusterType) == 0 )
105
+ else if (ClusterType == CTpMachineType_DropZone )
106
106
{
107
107
getDropZoneMachineList (clientVersion, false , MachineList);
108
108
}
109
- else if (strcmp ( " STANDBYNNODE " , ClusterType) == 0 )
109
+ else if (ClusterType == CTpMachineType_StandBy )
110
110
{
111
111
getThorSpareMachineList (clientVersion, ClusterName, ClusterDirectory, MachineList);
112
112
getMachineList (clientVersion, eqHoleStandbyProcess, path.str (), " " , ClusterDirectory, MachineList);
113
113
}
114
- else if (strcmp ( " THORSPARENODES " , ClusterType) == 0 )
114
+ else if (ClusterType == CTpMachineType_ThorSpare )
115
115
{
116
116
getThorSpareMachineList (clientVersion, ClusterName, ClusterDirectory, MachineList);
117
117
}
118
- else if (strcmp ( " HOLESTANDBYNODES " , ClusterType) == 0 )
118
+ else if (ClusterType == CTpMachineType_HoleStandby )
119
119
{
120
120
getMachineList (clientVersion, eqHoleStandbyProcess, path.str (), " " , ClusterDirectory, MachineList);
121
121
}
@@ -756,23 +756,23 @@ void CTpWrapper::queryTargetClusterProcess(double version, const char* processNa
756
756
OS_TYPE os = OS_WINDOWS;
757
757
unsigned int clusterTypeLen = strlen (clusterType);
758
758
const char * childType = NULL ;
759
- const char * clusterType0 = NULL ;
759
+ CTpMachineType clusterType0 = TpMachineType_Undefined ;
760
760
if (clusterTypeLen > 4 )
761
761
{
762
762
if (!strnicmp (clusterType, " roxie" , 4 ))
763
763
{
764
764
childType = " RoxieServerProcess[1]" ;
765
- clusterType0 = eqROXIEMACHINES ;
765
+ clusterType0 = CTpMachineType_Roxie ;
766
766
}
767
767
else if (!strnicmp (clusterType, " thor" , 4 ))
768
768
{
769
769
childType = " ThorMasterProcess" ;
770
- clusterType0 = eqTHORMACHINES ;
770
+ clusterType0 = CTpMachineType_Thor ;
771
771
}
772
772
else
773
773
{
774
774
childType = " HoleControlProcess" ;
775
- clusterType0 = eqHOLEMACHINES ;
775
+ clusterType0 = CTpMachineType_Hole ;
776
776
}
777
777
}
778
778
@@ -800,7 +800,7 @@ void CTpWrapper::queryTargetClusterProcess(double version, const char* processNa
800
800
}
801
801
clusterInfo->setOS (os);
802
802
803
- if (clusterType0 && *clusterType0 )
803
+ if (clusterType0 != TpMachineType_Undefined )
804
804
{
805
805
bool hasThorSpareProcess = false ;
806
806
IArrayOf<IEspTpMachine> machineList;
0 commit comments