ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Spectre/Spectre.cpp
(Generate patch)

Comparing trunk/Spectre/Spectre.cpp (file contents):
Revision 225 by douglas, 2003-07-15T17:25:42-07:00 vs.
Revision 226 by douglas, 2003-07-30T16:29:00-07:00

# Line 10 | Line 10
10  
11   string program;
12   string programName = "Spectre Samba Mounter";
13 < string programVersion = "1.0beta";
13 > string programVersion = "1.0rc1";
14   bool debug = false;
15  
16   Config config;
# Line 239 | Line 239 | void automake(set<string>& makes)
239  
240          if (debug) cerr << "findsmb = {\n";
241  
242 <        for (unsigned index = 0; index < 5; index++)
242 >        do
243          {
244 +                if (isdigit(findsmb.peek())) break;
245 +
246                  string line;
247  
248                  getline(findsmb, line);
249  
250                  if (debug) cerr << line << "\n";
251          }
252 +        while (findsmb.good());
253  
254          automake(makes, findsmb);
255  
# Line 275 | Line 278 | void automake(set<string>& makes, ipstre
278                  if (!isdigit(pin.peek())) break;
279  
280                  char ip[17];
281 <                char host[16];
281 >                string tab;
282 >                char host[15];
283                  string info;
284  
285                  pin.get(ip, 17);
286 <                pin.ignore();
287 <                pin.get(host, 16);
286 >
287 >                while (isspace(pin.peek()))
288 >                {
289 >                        tab += pin.get();
290 >                }
291 >
292 >                pin.get(host, 15);
293                  getline(pin, info);
294  
295 <                if (debug) cerr << ip << "\t" << host << info << "\n";
295 >                if (debug) cerr << ip << tab << host << info << "\n";
296  
297                  strip(host);
298  
# Line 312 | Line 321 | void automount(set<string>& mounts)
321  
322          if (debug) cerr << "findsmb = {\n";
323  
324 <        for (unsigned index = 0; index < 5; index++)
324 >        do
325          {
326 +                if (isdigit(findsmb.peek())) break;
327 +
328                  string line;
329  
330                  getline(findsmb, line);
331  
332                  if (debug) cerr << line << "\n";
333          }
334 +        while (findsmb.good());
335  
336          set<string> hosts;
337          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines