Ignore:
Timestamp:
2008-05-22T11:26:01+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Replaced a bunch of "gdbmhome" with "dbhome".

Location:
gsdl/trunk/src/w32server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/w32server/cgiwrapper.cpp

    r15412 r15625  
    380380  // required to create a collection specific receptionist
    381381  text_t collection = "";
    382   text_tset gdbmhomes;
     382  text_tset dbhomes;
    383383  text_tset collections;
    384384
     
    404404    // collection specific receptionist - one collection, one gsdlhome
    405405    collections.insert (collection);
    406     gdbmhomes.insert (gsdl_gdbmhome);
     406    dbhomes.insert (gsdl_dbhome);
    407407    collectioninfo_t tmp;
    408408    tmp.gsdl_gsdlhome = gsdl_gsdlhome;
    409     tmp.gsdl_gdbmhome = gsdl_gdbmhome;
     409    tmp.gsdl_dbhome = gsdl_dbhome;
    410410    translated_collectinfo[collection] = tmp;
    411411
     
    420420    colinfo_tmap::const_iterator end_info = gsdl_collectinfo.end();
    421421    while (this_info != end_info) {
    422       if (gdbmhomes.find ((*this_info).second.gsdl_gdbmhome) == gdbmhomes.end()) {
     422      if (dbhomes.find ((*this_info).second.gsdl_dbhome) == dbhomes.end()) {
    423423    these_collections.erase (these_collections.begin(), these_collections.end());
    424424    read_dir (filename_cat ((*this_info).second.gsdl_gsdlhome, "collect"), these_collections);
     
    444444      ++colhere;
    445445    }
    446     gdbmhomes.insert ((*this_info).second.gsdl_gdbmhome);
     446    dbhomes.insert ((*this_info).second.gsdl_dbhome);
    447447      }
    448448      ++this_info;
    449449    }
    450450 
    451     // then if necessary the main gdbmhome (this should only happen if the
    452     // gsdl.ini is a little screwed up and no volume gdbmhomes occurred)
    453     if (gdbmhomes.find (gsdl_gdbmhome) == gdbmhomes.end()) {
     451    // then if necessary the main dbhome (this should only happen if the
     452    // gsdl.ini is a little screwed up and no volume dbhomes occurred)
     453    if (dbhomes.find (gsdl_dbhome) == dbhomes.end()) {
    454454      these_collections.erase (these_collections.begin(), these_collections.end());
    455       read_dir (filename_cat (gsdl_gdbmhome, "collect"), these_collections);
     455      read_dir (filename_cat (gsdl_dbhome, "collect"), these_collections);
    456456      colhere = these_collections.begin();
    457457      colend = these_collections.end();
     
    460460    collectioninfo_t tmp;
    461461    tmp.gsdl_gsdlhome = gsdl_gsdlhome;
    462     tmp.gsdl_gdbmhome = gsdl_gdbmhome;
     462    tmp.gsdl_dbhome = gsdl_dbhome;
    463463    translated_collectinfo[*colhere] = tmp;
    464464    ++colhere;
    465465      }
    466       gdbmhomes.insert (gsdl_gdbmhome);
     466      dbhomes.insert (gsdl_dbhome);
    467467    }
    468468  }
     
    481481    // create collection server and add to null protocol
    482482    text_t this_gsdlhome = gsdl_gsdlhome;
    483     text_t this_gdbmhome = gsdl_gdbmhome;
     483    text_t this_dbhome = gsdl_dbhome;
    484484    colinfo_tmap::const_iterator it = translated_collectinfo.find (*thiscol);
    485485    assert (it != translated_collectinfo.end());
    486486    this_gsdlhome = (*it).second.gsdl_gsdlhome;
    487     this_gdbmhome = (*it).second.gsdl_gdbmhome;
     487    this_dbhome = (*it).second.gsdl_dbhome;
    488488
    489489    cservers->add_collection (*thiscol, this_gsdlhome);
     
    615615  // set defaults
    616616  recpt.configure ("gsdlhome", gsdl_gsdlhome);
    617   recpt.configure ("gdbmhome", gsdl_gdbmhome);
     617  recpt.configure ("gdbmhome", gsdl_dbhome);
    618618  recpt.configure ("collection", collection);
    619619
     
    629629    tmpconf.push_back ((*this_info).first);
    630630    tmpconf.push_back ((*this_info).second.gsdl_gsdlhome);
    631     tmpconf.push_back ((*this_info).second.gsdl_gdbmhome);
     631    tmpconf.push_back ((*this_info).second.gsdl_dbhome);
    632632    recpt.configure ("collectinfo", tmpconf);
    633633    ++this_info;
    634634  }
    635635
    636   // read in config files of each gdbmhome (in no particular order)
     636  // read in config files of each dbhome (in no particular order)
    637637  // those read in last will override those read earlier
    638638  // collections being used together in this way should be
    639639  // careful not to have main.cfg files that might
    640640  // screw with each other.
    641   text_tset::const_iterator thome = gdbmhomes.begin();
    642   text_tset::const_iterator ehome = gdbmhomes.end();
     641  text_tset::const_iterator thome = dbhomes.begin();
     642  text_tset::const_iterator ehome = dbhomes.end();
    643643  while (thome != ehome) {
    644644    if (!main_cfg_read (recpt, *thome, collection)) {
  • gsdl/trunk/src/w32server/settings.cpp

    r11319 r15625  
    4747text_t gsdl_enterlib;
    4848text_t gsdl_gsdlhome;
    49 text_t gsdl_gdbmhome;
     49text_t gsdl_dbhome;
    5050text_t gsdl_collections;
    5151colinfo_tmap gsdl_collectinfo;
     
    300300    write_ini_line(fout, "enterlib", gsdl_enterlib);
    301301    write_ini_line(fout, "gsdlhome", gsdl_gsdlhome);
    302     write_ini_line(fout, "gdbmhome", gsdl_gdbmhome);
     302    write_ini_line(fout, "gdbmhome", gsdl_dbhome);
    303303   
    304304    write_ini_line(fout, "logfilename", gsdl_log_name);
     
    321321      if (!(*here).second.gsdl_gsdlhome.empty())
    322322    write_ini_line(fout, "gsdlhome", (*here).second.gsdl_gsdlhome);
    323       if (!(*here).second.gsdl_gdbmhome.empty())
    324     write_ini_line(fout, "gdbmhome", (*here).second.gsdl_gdbmhome);
     323      if (!(*here).second.gsdl_dbhome.empty())
     324    write_ini_line(fout, "gdbmhome", (*here).second.gsdl_dbhome);
    325325     
    326326      ++here;
     
    385385  gsdl_enterlib = "/gsdl";
    386386  gsdl_gsdlhome = data_location;
    387   gsdl_gdbmhome = data_location;
     387  gsdl_dbhome = data_location;
    388388 
    389389  // debug settings
     
    475475        gsdl_collections = value;
    476476
    477       // gsdlhome must occur in file before gdbmhome       
     477      // gsdlhome must occur in file before dbhome     
    478478      } else if (key == "gsdlhome") {
    479479        gsdl_gsdlhome = value;
    480         gsdl_gdbmhome = value;
     480        gsdl_dbhome = value;
    481481     
    482482      } else if (key == "gdbmhome") {
    483         gsdl_gdbmhome = value;
     483        gsdl_dbhome = value;
    484484      }
    485485    } else {
    486486     
    487       // gsdlhome must occur in file before gdbmhome
     487      // gsdlhome must occur in file before dbhome
    488488      if (key == "gsdlhome") {
    489489        gsdl_collectinfo[section].gsdl_gsdlhome = value;
    490         gsdl_collectinfo[section].gsdl_gdbmhome = value;
     490        gsdl_collectinfo[section].gsdl_dbhome = value;
    491491      } else if (key == "gdbmhome") {
    492         gsdl_collectinfo[section].gsdl_gdbmhome = value;
     492        gsdl_collectinfo[section].gsdl_dbhome = value;
    493493      }
    494494    }
     
    502502  // extra slashes at the end
    503503  remove_end_slashes (gsdl_gsdlhome);
    504   remove_end_slashes (gsdl_gdbmhome);
     504  remove_end_slashes (gsdl_dbhome);
    505505  colinfo_tmap::iterator here = gsdl_collectinfo.begin();
    506506  colinfo_tmap::iterator end = gsdl_collectinfo.end();
    507507  while (here != end) {
    508508    remove_end_slashes ((*here).second.gsdl_gsdlhome);
    509     remove_end_slashes ((*here).second.gsdl_gdbmhome);
     509    remove_end_slashes ((*here).second.gsdl_dbhome);
    510510    ++here;
    511511  }
  • gsdl/trunk/src/w32server/settings.h

    r11319 r15625  
    4848extern text_t gsdl_enterlib;
    4949extern text_t gsdl_gsdlhome;
    50 extern text_t gsdl_gdbmhome;
     50extern text_t gsdl_dbhome;
    5151extern text_t gsdl_collections;
    5252extern colinfo_tmap gsdl_collectinfo;
Note: See TracChangeset for help on using the changeset viewer.