ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/Config.cpp
(Generate patch)

Comparing projects/cms/source/host/c++/Config.cpp (file contents):
Revision 1.3 by ab11, Mon Feb 26 14:59:54 2001 UTC vs.
Revision 1.5 by ab11, Mon Mar 5 12:41:06 2001 UTC

# Line 34 | Line 34 | Config::Config( string serverName, int serverPort, int
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
# Line 151 | Line 153 | int Config::destroyHeartbeat(){
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
# Line 202 | Line 258 | int Config::chatConfig(){
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          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines