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".

File:
1 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)) {
Note: See TracChangeset for help on using the changeset viewer.