11 |
|
// setup some standard variables |
12 |
|
sequence = 0; // no packets sent yet |
13 |
|
|
14 |
– |
// get our values from config |
15 |
– |
|
16 |
– |
|
14 |
|
// setup our arrays |
15 |
|
titlepointer = 0; |
16 |
< |
for ( int i=0; i < 40; i++ ){ |
16 |
> |
for ( int i=0; i < max_titles; i++ ){ |
17 |
|
titles[i] = ""; |
18 |
|
values[i] = ""; |
19 |
|
} |
25 |
|
int SysMon::collect(){ |
26 |
|
if ( debug == 1 ){ |
27 |
|
std::cout << "SysMon::collect()\n"; |
28 |
< |
} |
28 |
> |
} // if |
29 |
|
|
30 |
|
// say we have checked again |
31 |
|
checks++; |
32 |
|
|
33 |
|
// collect the system data and place it in an array of strings. |
34 |
|
// presume that the data is all formtted correctly. |
35 |
< |
char input[2048]; |
35 |
> |
|
36 |
|
if ( debug == 1 ){ |
37 |
|
std::cout << "SysMon::collect::ipipestream\n"; |
38 |
|
} |
39 |
< |
// ipipestream p("statgrab.pl"); |
40 |
< |
p = new SubPipe("statgrab.pl"); |
39 |
> |
|
40 |
> |
p = new SubPipe("./statgrab.pl"); |
41 |
|
|
42 |
|
// get the output into input from statgrab |
43 |
|
string sinput; |
44 |
< |
while ( p->getLine(&sinput) ){ |
48 |
< |
// find the first non-whitespace char in input |
44 |
> |
while ( p->getLine(&sinput) == 0 ){ |
45 |
|
|
46 |
+ |
if ( titlepointer == max_titles ){ |
47 |
+ |
std::cout << "WARNING: Max Titles reached, skipping remaining" << endl; |
48 |
+ |
std::cout << "Try recompiling with a value greater than the current (" << max_titles << ")" << endl; |
49 |
+ |
titlepointer--; |
50 |
+ |
break; |
51 |
+ |
} // if |
52 |
+ |
|
53 |
|
// locate the first white space |
54 |
|
int found = sinput.find(" ",0); |
55 |
|
if ( found == string::npos ){ |
56 |
|
// error |
57 |
|
if ( debug == 1 ){ |
58 |
|
std::cout << "SysMon::collect::Parse error from statgrab.pl\n"; |
59 |
< |
} |
59 |
> |
} // if |
60 |
|
} else { |
61 |
|
int gotTitle = 0; |
62 |
|
// now use the array of titles and values |
63 |
< |
for ( int i = 0; i < 60; i++ ){ |
63 |
> |
for ( int i = 0; i < max_titles; i++ ){ |
64 |
|
// check against the array value |
65 |
|
if ( titles[i] == sinput.substr(0,found) ){ |
66 |
|
// is the one we are looking for. |
67 |
|
if ( debug == 2 ){ |
68 |
|
std::cout << "SysMon::collect::Found Value\n"; |
69 |
< |
|
70 |
< |
} |
69 |
> |
} // if debug |
70 |
> |
|
71 |
|
gotTitle = 1; |
72 |
|
// now modify the data in the arrays if they are numbers |
73 |
< |
char * end; |
71 |
< |
char *buffer; |
72 |
< |
// buffer = sinput.substr(found+1, sinput.length()); |
73 |
< |
double dbl = strtod( ((string) sinput.substr(found+1, sinput.length())).c_str(), &end); |
74 |
< |
if ( dbl == 0 ){ |
75 |
< |
// error? we aren't so sure. check the position |
76 |
< |
// of end. |
77 |
< |
if ( *end == sinput.length()-1 ){ |
78 |
< |
// was the end.. ok |
79 |
< |
// must have worked! |
80 |
< |
double dbl2 = 0; //strtod(values[i], &end); |
81 |
< |
dbl2 += dbl; |
82 |
< |
char * buffer; |
83 |
< |
int precision = 5; |
84 |
< |
int decimal, sign; |
85 |
< |
buffer = ecvt (dbl2, precision, &decimal, &sign); |
86 |
< |
} // if *end |
87 |
< |
} else { |
88 |
< |
// must have worked! |
89 |
< |
double dbl2 = 0; //strtod(values[i], &end); |
90 |
< |
dbl2 += dbl; |
91 |
< |
char * buffer; |
92 |
< |
int precision = 5; |
93 |
< |
int decimal, sign; |
94 |
< |
buffer = ecvt (dbl2, precision, &decimal, &sign); |
95 |
< |
} // if |
96 |
< |
} // if |
73 |
> |
} // if (titles[i]) |
74 |
|
} // for |
75 |
+ |
|
76 |
|
// did we find this title? if not add it |
77 |
|
if ( gotTitle == 0 ){ |
78 |
|
// didnt |
79 |
|
if ( debug == 1 ){ |
80 |
< |
std::cout << "SysMon::collect::Adding New Value\n"; |
81 |
< |
std::cout << "'" << sinput.substr(0,found) << "'\n"; |
82 |
< |
std::cout << "'" << sinput.substr(found+1, sinput.length()) << "'\n"; |
83 |
< |
} |
80 |
> |
std::cout << "SysMon::collect::Adding New Value\n"; |
81 |
> |
std::cout << "'" << sinput.substr(0,found) << "' : "; |
82 |
> |
std::cout << "'" << sinput.substr(found+1, sinput.length()) << "'\n"; |
83 |
> |
} // if |
84 |
|
titles[titlepointer] = sinput.substr(0,found); |
85 |
|
values[titlepointer] = sinput.substr(found+1, sinput.length()); |
86 |
|
titlepointer++; |
90 |
|
|
91 |
|
} // while |
92 |
|
|
93 |
+ |
// delete the pointer to free up memory |
94 |
|
delete p; |
95 |
|
|
96 |
|
if ( debug == 1 ){ |
97 |
|
std::cout << "SysMon::collect::Parse from StatGrab finished\n"; |
98 |
< |
} |
98 |
> |
} // if |
99 |
|
|
121 |
– |
// alert? |
122 |
– |
// return 1; |
123 |
– |
|
100 |
|
// return sucessful |
101 |
|
return 0; |
102 |
|
|
103 |
|
} // collect |
104 |
|
|
105 |
+ |
void SysMon::clearData(){ |
106 |
+ |
|
107 |
+ |
titlepointer = 0; |
108 |
+ |
for ( int i=0; i < max_titles; i++ ){ |
109 |
+ |
titles[i] = ""; |
110 |
+ |
values[i] = ""; |
111 |
+ |
} // for |
112 |
+ |
|
113 |
+ |
return; |
114 |
+ |
|
115 |
+ |
} // clearData |
116 |
+ |
|
117 |
+ |
|
118 |
|
string SysMon::getData(){ |
119 |
|
|
120 |
|
if ( debug == 1 ){ |
121 |
|
std::cout << "SysMon::getData()\n"; |
122 |
< |
} |
122 |
> |
} // if |
123 |
|
|
124 |
|
// create an xml object |
125 |
|
XMLFormatter xml = XMLFormatter(); |
126 |
|
|
127 |
< |
int i=0; |
127 |
> |
if ( debug == 1 ){ |
128 |
> |
std::cout << "SysMon::getData::Sorting " << titlepointer << " elements\n"; |
129 |
> |
} // if |
130 |
> |
|
131 |
> |
// firstly sort the data. |
132 |
> |
// simple bubble sort |
133 |
> |
int flag = 1; |
134 |
> |
while ( flag == 1 ){ |
135 |
> |
flag = 0; |
136 |
> |
for ( int i=1; i<=titlepointer; i++ ){ |
137 |
> |
if (titles[i-1].compare(titles[i]) > 0 ){ |
138 |
> |
// swap them |
139 |
> |
string temp; |
140 |
> |
temp = titles[i-1]; |
141 |
> |
titles[i-1] = titles[i]; |
142 |
> |
titles[i] = temp; |
143 |
> |
// now do the values |
144 |
> |
temp = values[i-1]; |
145 |
> |
values[i-1] = values[i]; |
146 |
> |
values[i] = temp; |
147 |
> |
// say we have changed something |
148 |
> |
flag = 1; |
149 |
> |
} // if |
150 |
> |
} // for |
151 |
> |
} // while |
152 |
> |
|
153 |
> |
/* used to check the array has sorted correctly |
154 |
> |
for ( int i=0; i < titlepointer; i++ ){ |
155 |
> |
std::cout << titles[i] << endl; |
156 |
> |
} |
157 |
> |
*/ |
158 |
> |
|
159 |
> |
// work through each one of the titles in turn and |
160 |
> |
// work out their levels. |
161 |
> |
|
162 |
|
int count = 0; |
163 |
< |
int finished = 0; |
164 |
< |
string root = "packet."; |
165 |
< |
string level = root; |
163 |
> |
string currentLevel = "packet"; |
164 |
> |
string currentLevels[10]; |
165 |
> |
int currentLevelint = 0; |
166 |
> |
int retryCount = 0; |
167 |
|
string attributes = ""; |
168 |
< |
string attr = ""; |
169 |
< |
while ( i < titlepointer ){ |
146 |
< |
finished = 0; |
147 |
< |
count = 0; |
148 |
< |
attr = ""; |
149 |
< |
while ( finished != 1 ){ |
150 |
< |
count++; |
151 |
< |
if ( count > 10 ){ |
152 |
< |
// don't do more than 10 times.. its probably not gonna work! |
153 |
< |
finished = 1; |
154 |
< |
} |
155 |
< |
|
156 |
< |
// do for each item |
157 |
< |
int where = titles[i].find(level,0); |
158 |
< |
|
159 |
< |
// where now contains the position of 'level' |
160 |
< |
if ( where != string::npos ){ |
161 |
< |
// we found it, now check the size to see if this is the final level |
162 |
< |
// grab the end bit a look for .'s |
163 |
< |
string end = titles[i].substr(level.length(), titles[i].length()-level.length() ); |
164 |
< |
|
165 |
< |
// now end should contain "something.something" etc |
166 |
< |
// look to find a . in there that means more to traverse |
167 |
< |
// but check for 'attributes' tags... |
168 |
< |
|
169 |
< |
where = end.find("attributes.",0); |
170 |
< |
if ( where != string::npos ){ |
171 |
< |
// is an attribute |
172 |
< |
// need to check that there are no more levels above this one |
173 |
< |
|
174 |
< |
|
175 |
< |
|
176 |
< |
/* |
177 |
< |
|
178 |
< |
// where points to the start of attributes |
179 |
< |
int start = 0; |
180 |
< |
if ( level.find(".",start) < where-1 ){ |
181 |
< |
start = level.find(".", start); |
182 |
< |
} // if |
183 |
< |
|
184 |
< |
// start points to the thing to apply the attributes to. |
185 |
< |
// need to take the level upto before this point |
186 |
< |
string needLevel = end.substr(0,start-2); |
187 |
< |
std::cout << "needlevel " << needLevel << endl; |
188 |
< |
|
189 |
< |
// now we need to find the level we are at |
190 |
< |
while (( needLevel.length() > 0 ) && (needLevel.find(".",0) != string::npos ) ){ |
191 |
< |
int got = needLevel.find(".",0); |
192 |
< |
if ( got != string::npos ){ |
193 |
< |
// we need to grab up until the . |
194 |
< |
xml.addNest(needLevel.substr(0,got)); |
195 |
< |
level += needLevel.substr(0,got); |
196 |
< |
level += "."; |
197 |
< |
std::cout << "Adding Nest " << needLevel.substr(0,got) << endl; |
198 |
< |
needLevel = needLevel.substr(got+1, needLevel.length()-(got+1)); |
199 |
< |
} // if |
200 |
< |
std::cout << "needlevel " << needLevel << endl; |
201 |
< |
} // while |
202 |
< |
|
203 |
< |
// add the final nest |
204 |
< |
xml.addNest(needLevel); |
205 |
< |
level += needLevel; |
206 |
< |
level += "."; |
207 |
< |
std::cout << "Adding Nest " << needLevel << endl; |
208 |
< |
|
209 |
< |
*/ |
210 |
< |
|
211 |
< |
// now write out the variable |
212 |
< |
xml.addElement(end, values[i]); |
213 |
< |
finished = 1; |
214 |
< |
|
215 |
< |
} else { |
216 |
< |
if ( where == 0 ){ |
217 |
< |
// this is something we care about. |
218 |
< |
// it has an attribute tab, and thus we want to add it |
219 |
< |
// to the tag one lower than this (hopefully level!) |
220 |
< |
|
221 |
< |
// attributes = attributes + mount |
222 |
< |
attributes += end.substr(where+11, end.length()-(where+11)); |
223 |
< |
// attributes = attributes + mount=" |
224 |
< |
attributes += "=\""; |
225 |
< |
// attributes = attributes + mount="/dev |
226 |
< |
attributes += values[i]; |
227 |
< |
// attributes = attributes + mount="/dev" |
228 |
< |
attributes += "\" "; |
229 |
< |
} else { |
230 |
< |
// need to check if we are the last element before |
231 |
< |
// an attribute tag, so we want to get up to this tag first |
232 |
< |
while ( end.find(".",0) != string::npos ){ |
233 |
< |
|
234 |
< |
where = end.find(".",0); |
235 |
< |
string newNest = end.substr(0,where); |
236 |
< |
xml.addNest(newNest); |
237 |
< |
level += newNest; |
238 |
< |
level += "."; |
239 |
< |
// redefine end |
240 |
< |
end = end.substr(where+1, end.length()-(where+1)); |
241 |
< |
} // while |
242 |
< |
|
243 |
< |
|
244 |
< |
xml.addElement(end, values[i]); |
245 |
< |
finished = 1; |
246 |
< |
} // if where == 0 |
247 |
< |
} // if attribute tags |
168 |
> |
int isAttrib = 0; |
169 |
> |
string attributeLevel = ""; |
170 |
|
|
171 |
< |
|
171 |
> |
// init that array quickly ;) |
172 |
> |
for ( int i=0; i< 10; i++ ){ |
173 |
> |
currentLevels[i] = ""; |
174 |
> |
} // for |
175 |
|
|
176 |
< |
|
177 |
< |
} else { // if doesn't contains level |
178 |
< |
|
254 |
< |
// we need to move one back and try again, until we are all the way |
255 |
< |
// back to "packet." |
256 |
< |
// go about it by closing nests |
257 |
< |
|
258 |
< |
while ( level.length() > root.length() ){ |
259 |
< |
// need to close one nest and locate the next . from the end (hassle) |
260 |
< |
int start = 0; |
261 |
< |
if ( level.find(".",start) != string::npos ){ |
262 |
< |
start = level.find(".", start); |
263 |
< |
} // if |
264 |
< |
// should now have the last . |
265 |
< |
xml.closeNest(); |
266 |
< |
level = level.substr(0, start+1); |
267 |
< |
} |
268 |
< |
|
269 |
< |
} // if contains level |
270 |
< |
|
271 |
< |
} // while |
272 |
< |
i++; |
273 |
< |
} // while |
176 |
> |
if ( debug == 1 ){ |
177 |
> |
std::cout << "SysMon::getData::Starting while\n"; |
178 |
> |
} // if |
179 |
|
|
180 |
< |
|
181 |
< |
|
182 |
< |
|
183 |
< |
|
184 |
< |
|
185 |
< |
|
180 |
> |
while ( count <= titlepointer ){ |
181 |
> |
|
182 |
> |
if ( debug == 1 ){ |
183 |
> |
std::cout << "Processing: " << titles[count] << endl; |
184 |
> |
} // if |
185 |
> |
|
186 |
> |
retryCount++; |
187 |
> |
|
188 |
> |
currentLevel = ""; |
189 |
> |
for ( int i=0; i<currentLevelint; i++ ){ |
190 |
> |
if (( currentLevel != "" ) && ( i != currentLevelint )){ |
191 |
> |
currentLevel += "."; |
192 |
> |
} // if |
193 |
> |
currentLevel += currentLevels[i]; |
194 |
> |
} // for |
195 |
> |
|
196 |
> |
// set the title into a variable |
197 |
> |
string currentTitle = titles[count]; |
198 |
> |
|
199 |
> |
// make an array of strings to hold the levels |
200 |
> |
string levels[10]; |
201 |
> |
for ( int i=0; i< 10; i++ ){ |
202 |
> |
levels[i] = ""; |
203 |
> |
} // for |
204 |
> |
int level = 0; |
205 |
> |
|
206 |
> |
|
207 |
> |
// firstly find the first . |
208 |
> |
int dotPosition = currentTitle.find("."); |
209 |
> |
|
210 |
> |
while ( dotPosition != string::npos ){ |
211 |
> |
|
212 |
> |
levels[level] = currentTitle.substr(0,dotPosition); |
213 |
> |
|
214 |
> |
// now remove this bit |
215 |
> |
currentTitle = currentTitle.substr(dotPosition+1); |
216 |
> |
|
217 |
> |
// now find the position of the next dot |
218 |
> |
dotPosition = currentTitle.find("."); |
219 |
> |
|
220 |
> |
// increment level etc |
221 |
> |
level++; |
222 |
> |
|
223 |
> |
// we already are at 'packet' level because of |
224 |
> |
// the outer packet tags, get rif of it , only |
225 |
> |
// first one mind! |
226 |
> |
if ( levels[0] == "packet" ){ |
227 |
> |
level--; |
228 |
> |
} // if |
229 |
> |
|
230 |
> |
} // while dotPosition |
231 |
> |
|
232 |
> |
// now grab the value title |
233 |
> |
levels[level] = currentTitle; |
234 |
> |
|
235 |
> |
// now have the levels and the level depth. |
236 |
> |
// check it against the last one, reconstruct a |
237 |
> |
// level string |
238 |
> |
|
239 |
> |
// only do this if the 2nd to last string is not |
240 |
> |
// atrribute |
241 |
> |
string newLevelString = ""; |
242 |
> |
|
243 |
> |
if ( level > 0 ){ |
244 |
> |
if ( levels[level-1] != "attributes" ){ |
245 |
> |
// say it isn't an attribute, but write out |
246 |
> |
// the attribute first if the last one was |
247 |
> |
if ( attributeLevel != "" ){ |
248 |
> |
xml.addElement(attributeLevel,attributes,""); |
249 |
> |
if ( debug == 1 ){ |
250 |
> |
std::cout << "Adding Element + attributes" << endl; |
251 |
> |
} // if |
252 |
> |
|
253 |
> |
} // if |
254 |
> |
isAttrib = 0; |
255 |
> |
attributeLevel = ""; |
256 |
> |
attributes = ""; |
257 |
> |
|
258 |
> |
for ( int i=0; i < level; i++ ){ |
259 |
> |
newLevelString += levels[i]; |
260 |
> |
if ( i != level-1 ){ |
261 |
> |
newLevelString += "."; |
262 |
> |
} // if |
263 |
> |
} // for |
264 |
> |
} // if levels[level] |
265 |
> |
|
266 |
> |
else |
267 |
> |
|
268 |
> |
{ |
269 |
> |
// we need to add to the attributes |
270 |
> |
level -= 2; |
271 |
> |
for ( int i=0; i < level; i++ ){ |
272 |
> |
newLevelString += levels[i]; |
273 |
> |
if ( i != level-1 ){ |
274 |
> |
newLevelString += "."; |
275 |
> |
} // if |
276 |
> |
} // for |
277 |
> |
|
278 |
> |
isAttrib = 1; |
279 |
> |
if ( attributeLevel == "" ){ |
280 |
> |
// set this attribute to be the level |
281 |
> |
attributeLevel = levels[level]; |
282 |
> |
} else { |
283 |
> |
if ( levels[level] != attributeLevel ){ |
284 |
> |
// arrg! its a different level! |
285 |
> |
if ( attributeLevel != levels[level] ){ |
286 |
> |
xml.addElement(attributeLevel,attributes,""); |
287 |
> |
if ( debug == 1 ){ |
288 |
> |
std::cout << "Adding Element + attributes1" << endl; |
289 |
> |
} // if |
290 |
> |
attributeLevel = ""; |
291 |
> |
attributes = ""; |
292 |
> |
count++; |
293 |
> |
} // if |
294 |
> |
if ( count == titlepointer ){ |
295 |
> |
xml.addElement(attributeLevel,attributes,""); |
296 |
> |
if ( debug == 1 ){ |
297 |
> |
std::cout << "Adding Element + attributes2" << endl; |
298 |
> |
} // if |
299 |
> |
attributeLevel = ""; |
300 |
> |
attributes = ""; |
301 |
> |
count++; |
302 |
> |
} // if |
303 |
> |
} // if |
304 |
> |
} // if else |
305 |
> |
|
306 |
> |
} // else attributes |
307 |
> |
} // if level > 1 |
308 |
> |
else { |
309 |
> |
if ( count == titlepointer ){ |
310 |
> |
if ( attributeLevel != "" ){ |
311 |
> |
xml.addElement(attributeLevel,attributes,""); |
312 |
> |
if ( debug == 1 ){ |
313 |
> |
std::cout << "Adding Element + attributes3" << endl; |
314 |
> |
} // if |
315 |
> |
attributeLevel = ""; |
316 |
> |
attributes = ""; |
317 |
> |
count++; |
318 |
> |
} // if |
319 |
> |
} // if |
320 |
> |
|
321 |
> |
|
322 |
> |
for ( int i=0; i < level; i++ ){ |
323 |
> |
newLevelString += levels[i]; |
324 |
> |
if ( i != level-1 ){ |
325 |
> |
newLevelString += "."; |
326 |
> |
} // if |
327 |
> |
} // for |
328 |
> |
} // if level == 1 |
329 |
> |
|
330 |
> |
// check if it is the same |
331 |
> |
if ( newLevelString == currentLevel ){ |
332 |
> |
// it is the same level, just add this as another element |
333 |
> |
if ( isAttrib ){ |
334 |
> |
attributes += levels[level+2]; |
335 |
> |
attributes += "=\""; |
336 |
> |
attributes += values[count]; |
337 |
> |
attributes += "\" "; |
338 |
> |
|
339 |
> |
} else { |
340 |
> |
xml.addElement(levels[level], values[count]); |
341 |
> |
count++; |
342 |
> |
if ( debug == 1 ){ |
343 |
> |
std::cout << "Adding Element" << endl; |
344 |
> |
} // if |
345 |
> |
} // if |
346 |
> |
|
347 |
> |
} else { |
348 |
> |
// gotta change it |
349 |
> |
|
350 |
> |
while( newLevelString.find(currentLevel) == string::npos ){ |
351 |
> |
|
352 |
> |
if ( currentLevelint <= 0 ){ |
353 |
> |
break; |
354 |
> |
} // if |
355 |
> |
|
356 |
> |
// back up atleast one level... |
357 |
> |
xml.closeNest(); |
358 |
> |
if ( debug == 1 ){ |
359 |
> |
std::cout << "Closing Nest" << endl; |
360 |
> |
} // if |
361 |
> |
// remove the last item |
362 |
> |
currentLevelint--; |
363 |
> |
|
364 |
> |
currentLevel = ""; |
365 |
> |
for ( int i=0; i<currentLevelint; i++ ){ |
366 |
> |
currentLevel += currentLevels[i]; |
367 |
> |
if ( i != currentLevelint-1 ){ |
368 |
> |
currentLevel += "."; |
369 |
> |
} // if |
370 |
> |
} // for |
371 |
> |
|
372 |
> |
} // while |
373 |
> |
|
374 |
> |
|
375 |
> |
while ( newLevelString != currentLevel ){ |
376 |
> |
|
377 |
> |
// now got to a level which we like. |
378 |
> |
currentLevels[currentLevelint] = levels[currentLevelint]; |
379 |
> |
|
380 |
> |
// add in one more level and restart the loop |
381 |
> |
xml.addNest(levels[currentLevelint]); |
382 |
> |
if ( debug == 1 ){ |
383 |
> |
std::cout << "Adding nest " << levels[currentLevelint] << endl; |
384 |
> |
} // if |
385 |
> |
|
386 |
> |
// set this to be the top level of the new level |
387 |
> |
currentLevelint++; |
388 |
> |
|
389 |
> |
currentLevel = ""; |
390 |
> |
for ( int i=0; i<currentLevelint; i++ ){ |
391 |
> |
currentLevel += currentLevels[i]; |
392 |
> |
if ( i != currentLevelint-1 ){ |
393 |
> |
currentLevel += "."; |
394 |
> |
} // if |
395 |
> |
} // for |
396 |
> |
|
397 |
> |
} // while |
398 |
> |
|
399 |
> |
|
400 |
> |
} // if |
401 |
> |
|
402 |
> |
if ( debug == 1 ){ |
403 |
> |
std::cout << "Retrying Main While" << endl; |
404 |
> |
} // if |
405 |
> |
|
406 |
> |
if ( retryCount > 10 ){ |
407 |
> |
count++; |
408 |
> |
if ( debug == 1 ){ |
409 |
> |
std::cout << "Tried too many times" << endl; |
410 |
> |
} // if |
411 |
> |
retryCount = 0; |
412 |
> |
} // if |
413 |
> |
|
414 |
> |
} // while |
415 |
> |
|
416 |
> |
if ( debug == 1 ){ |
417 |
> |
std::cout << "\n"; |
418 |
> |
} // if |
419 |
> |
|
420 |
|
// return the string |
421 |
|
return xml.returnXML(); |
422 |
|
|