Changeset 16310 for gsdl/trunk/src/colservr/colservrconfig.cpp
- Timestamp:
- 2008-07-09T13:12:15+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/src/colservr/colservrconfig.cpp
r15458 r16310 44 44 // collect_cfg_read reads collect.cfg returning true on success. 45 45 bool collect_cfg_read (collectserver &cserver, const text_t &gsdlhome, 46 const text_t &collection) { 47 text_t filename = filename_cat (gsdlhome, "collect"); 48 filename = filename_cat (filename, collection); 49 filename = filename_cat (filename, "custom"); 50 filename = filename_cat (filename, collection); 51 filename = filename_cat (filename, "etc"); 52 filename = filename_cat (filename, "custom.cfg"); 46 const text_t& collecthome, 47 const text_t &collection) 48 { 49 text_t filename = filename_cat (collecthome, collection); 50 filename = filename_cat (filename, "custom",collection,"etc","custom.cfg"); 53 51 54 52 if (!file_exists (filename)) { 55 filename = filename_cat (gsdlhome, "collect"); 56 filename = filename_cat (filename, collection); 57 filename = filename_cat (filename, "etc"); 58 filename = filename_cat (filename, "collect.cfg"); 53 filename = filename_cat (collecthome, collection, "etc", "collect.cfg"); 59 54 60 55 if (!file_exists (filename)) { 61 filename = filename_cat (gsdlhome, "etc"); 62 filename = filename_cat (filename, "collect.cfg"); 56 filename = filename_cat (gsdlhome, "etc", "collect.cfg"); 63 57 if (!file_exists (filename)) return false; 64 58 } … … 66 60 67 61 return cserver.read_configfile(filename); 68 /*69 // read in the collection configuration file70 text_t key;71 text_tarray cfgline;72 char *cstr = filename.getcstr();73 ifstream confin (cstr);74 delete []cstr;75 76 if (confin) {77 while (read_cfg_line(confin, cfgline) >= 0) {78 if (cfgline.size () >= 2) {79 key = cfgline[0];80 cfgline.erase(cfgline.begin());81 82 // configure the collection server83 cserver.configure (key, cfgline);84 }85 }86 confin.close ();87 return true;88 }89 return false;90 */91 62 } 92 63 … … 94 65 // build_cfg_read reads build.cfg and returns true on success. 95 66 bool build_cfg_read (collectserver &cserver, const text_t &gsdlhome, 67 const text_t& collecthome, 96 68 const text_t &collection) { 97 text_t filename = filename_cat (gsdlhome, "collect"); 98 filename = filename_cat (filename, collection); 99 filename = filename_cat (filename, "index"); 69 text_t filename = filename_cat (collecthome, collection,"index","build.cfg"); 100 70 101 filename = filename_cat (filename, "build.cfg");102 71 if (!file_exists (filename)) { 103 filename = filename_cat (gsdlhome, "index"); 104 filename = filename_cat (filename, "build.cfg"); 72 filename = filename_cat (gsdlhome, "index", "build.cfg"); 105 73 if (!file_exists (filename)) return false; 106 74 } … … 108 76 return cserver.read_configfile(filename); 109 77 110 /*111 // read in the build configuration file112 text_t key;113 text_tarray cfgline;114 char *cstr = filename.getcstr();115 ifstream confin (cstr);116 delete []cstr;117 118 if (confin) {119 while (read_cfg_line(confin, cfgline) >= 0) {120 if (cfgline.size () >= 2) {121 key = cfgline[0];122 cfgline.erase(cfgline.begin());123 124 // configure the collection server125 cserver.configure (key, cfgline);126 }127 }128 confin.close ();129 return true;130 }131 return false;132 */133 78 }
Note:
See TracChangeset
for help on using the changeset viewer.