Changeset 18903 for gsdl/trunk/runtime-src/src/oaiservr/oaiconfig.cpp
- Timestamp:
- 2009-04-08T10:47:40+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/oaiservr/oaiconfig.cpp
r18892 r18903 47 47 // parameter, read in all the collection's individual configurations 48 48 if (gsdlcollect == "") { 49 text_tarray::iterator here = this->collectList.begin(); 50 text_tarray::iterator end = this->collectList.end(); 51 while (here != end) { 52 this->configureCollection(gsdlhome, *here); 53 ++here; 54 } 49 text_tarray::iterator start = this->collectList.begin(); 50 text_tarray::iterator here = this->collectList.end()-1; 51 while (here != start) { 52 if (!this->configureCollection(gsdlhome, *here)) { 53 this->collectList.erase(here); 54 } 55 --here; 56 } 57 // and do the first one 58 if (!this->configureCollection(gsdlhome, *here)) { 59 this->collectList.erase(here); 60 } 61 55 62 } 56 63 else { 64 // what do we do if this fails? 57 65 this->configureCollection(gsdlhome, gsdlcollect); 58 66 } … … 81 89 } 82 90 83 voidoaiconfig::configureCollection(const text_t &gsdlhome, const text_t &gsdlcollect)91 bool oaiconfig::configureCollection(const text_t &gsdlhome, const text_t &gsdlcollect) 84 92 { 85 93 text_t cnfgfile = filename_cat(gsdlhome, "collect", gsdlcollect, "etc", "collect.cfg"); 94 if (!file_exists(cnfgfile)) { 95 return false; 96 } 86 97 this->collection = gsdlcollect; 87 98 this->read_configfile(cnfgfile); 88 } 89 99 100 return true; 101 } 90 102 void oaiconfig::configure (const text_t &key, const text_tarray &cfgline) 91 103 {
Note:
See TracChangeset
for help on using the changeset viewer.