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 177 by douglas, 2003-07-05T18:09:20-07:00 vs.
Revision 202 by douglas, 2003-07-15T17:25:42-07:00

# Line 304 | Line 304 | void automake(set<string>& makes, ipstre
304  
305   void automount(set<string>& mounts)
306   {
307 +        vector<string> args;
308 +
309 +        args.push_back("spectre");
310 +        
311 +        ipstream findsmb(config.findsmb, args);
312 +
313 +        if (debug) cerr << "findsmb = {\n";
314 +
315 +        for (unsigned index = 0; index < 5; index++)
316 +        {
317 +                string line;
318 +
319 +                getline(findsmb, line);
320 +
321 +                if (debug) cerr << line << "\n";
322 +        }
323 +
324 +        set<string> hosts;
325 +        
326 +        automake(hosts, findsmb);
327 +
328 +        if (debug) cerr << "}\n";
329 +
330 +        findsmb.close();
331 +
332          DIR* dir = opendir(config.root.c_str());
333          dirent* file;
334  
# Line 318 | Line 343 | void automount(set<string>& mounts)
343                  {
344                          string folder = file->d_name;
345  
346 <                        if (folder == "." || folder == "..") continue;
346 >                        if (folder == "." || folder == ".." || hosts.find(folder) ==
347 >                                hosts.end()) continue;
348  
349                          mounts.insert(folder);
350                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines