| 34 |
|
propertyNames[1] = "TCPUpdateTime"; |
| 35 |
|
propertyNames[2] = "FilterRetryTime"; |
| 36 |
|
propertyNames[3] = "ConfigRetryTime"; |
| 37 |
< |
numProperties = 4; |
| 37 |
> |
propertyNames[4] = "AVERAGERUpdateTime"; |
| 38 |
> |
propertyNames[5] = "MAXTCPFilterRetries"; |
| 39 |
> |
numProperties = 5; |
| 40 |
|
|
| 41 |
|
// read the Chat dialog we 'expect' to have with the config |
| 42 |
|
// manager from disk. This is a new idea so that the client |
| 153 |
|
|
| 154 |
|
} // destroyHeartBeat |
| 155 |
|
|
| 156 |
+ |
int Config::chatHeartBeat(){ |
| 157 |
+ |
|
| 158 |
+ |
string response; |
| 159 |
+ |
|
| 160 |
+ |
response = net->heartBeatSend("HEARTBEAT"); |
| 161 |
+ |
if ( response != "OK" ){ |
| 162 |
+ |
// something went wrong |
| 163 |
+ |
return -1; |
| 164 |
+ |
if ( debug == 1 ){ |
| 165 |
+ |
std::cout << "Config::chatHeartBeat::ERROR in HEARTBEAT\n"; |
| 166 |
+ |
} |
| 167 |
+ |
} |
| 168 |
+ |
|
| 169 |
+ |
response = net->heartBeatSend("CONFIG"); |
| 170 |
+ |
if ( response != "OK" ){ |
| 171 |
+ |
// something went wrong |
| 172 |
+ |
return -1; |
| 173 |
+ |
if ( debug == 1 ){ |
| 174 |
+ |
std::cout << "Config::chatHeartBeat::ERROR in CONFIG\n"; |
| 175 |
+ |
} |
| 176 |
+ |
} |
| 177 |
+ |
|
| 178 |
+ |
response = net->heartBeatSend(fileList); |
| 179 |
+ |
if ( response != "OK" ){ |
| 180 |
+ |
// something went wrong |
| 181 |
+ |
return -1; |
| 182 |
+ |
if ( debug == 1 ){ |
| 183 |
+ |
std::cout << "Config::chatHeartBeat::ERROR in fileList\n"; |
| 184 |
+ |
} |
| 185 |
+ |
} |
| 186 |
+ |
|
| 187 |
+ |
response = net->heartBeatSend(lastModified); |
| 188 |
+ |
if ( response != "OK" ){ |
| 189 |
+ |
// something went wrong |
| 190 |
+ |
return -1; |
| 191 |
+ |
if ( debug == 1 ){ |
| 192 |
+ |
std::cout << "Config::chatHeartBeat::ERROR in lastModified\n"; |
| 193 |
+ |
} |
| 194 |
+ |
} |
| 195 |
+ |
|
| 196 |
+ |
response = net->heartBeatSend("ENDHEARTBEAT"); |
| 197 |
+ |
if ( response != "OK" ){ |
| 198 |
+ |
// something went wrong |
| 199 |
+ |
return -1; |
| 200 |
+ |
if ( debug == 1 ){ |
| 201 |
+ |
std::cout << "Config::chatHeartBeat::ERROR in ENDHEARTBEAT\n"; |
| 202 |
+ |
} |
| 203 |
+ |
} |
| 204 |
+ |
|
| 205 |
+ |
// seems ok to me |
| 206 |
+ |
return 0; |
| 207 |
+ |
|
| 208 |
+ |
} // chat Heart Beat |
| 209 |
|
|
| 210 |
+ |
|
| 211 |
|
int Config::establishConfig(){ |
| 212 |
|
// ask smallnet to make a connection to the filtermanager so we can get some config |
| 213 |
|
// details |
| 258 |
|
std::cout << "Config::chatConfig::FILELIST\n"; |
| 259 |
|
} |
| 260 |
|
fileList = net->heartBeatSend("FILELIST"); |
| 261 |
+ |
|
| 262 |
+ |
fQDN = net->heartBeatSend("FQDN"); |
| 263 |
|
|
| 264 |
|
// now send the properties we want |
| 265 |
|
|