Changeset 15401

Show
Ignore:
Timestamp:
13.05.2008 10:58:58 (11 years ago)
Author:
mdewsnip
Message:

(Untangling colservr/recpt) Deleted setReceptionistServers() from colservr/collectset.cpp, since this required passing in the receptionist, and the colservr should be independent of the receptionist. Changed the one place this function was called (recpt/librarymain.cpp) to do the same functionality.

Location:
gsdl/trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/src/colservr/collectset.cpp

    r15002 r15401  
    455455  } 
    456456} 
    457  
    458 void collectset::setReceptionistServers(receptionist &recpt, text_t &gsdlhome) 
    459 {  
    460   collectservermapclass::iterator here = cservers.begin(); 
    461   collectservermapclass::iterator end = cservers.end(); 
    462   while (here != end) { 
    463     assert ((*here).second.c != NULL); 
    464  
    465     text_tarray colinfo; 
    466     colinfo.push_back((*here).second.c->get_collection_name()); 
    467     colinfo.push_back(gsdlhome); 
    468     colinfo.push_back(gsdlhome); 
    469     recpt.configure("collectinfo", colinfo); 
    470  
    471     ++here; 
    472   } 
    473 } 
  • gsdl/trunk/src/colservr/collectset.h

    r15002 r15401  
    1010#include "collectserver.h" 
    1111#include "cnfgable.h" 
    12 #include "receptionist.h" 
    1312#include "mgsearch.h" 
    1413#include "mgppsearch.h" 
     
    6160  collectservermapclass servers(); 
    6261 
    63   // configure a receptionist with the list of servers 
    64   void setReceptionistServers(receptionist &recpt, text_t &gsdlhome); 
    65  
    6662  // return an individual collection server 
    6763  collectserver *getCollectServer(const text_t &collection) 
  • gsdl/trunk/src/recpt/librarymain.cpp

    r14269 r15401  
    119119  cservers = new collectset(gsdlhome); 
    120120 
     121  // configure the receptionist server list 
     122  text_tarray collection_list; 
     123  cservers->getCollectionList(collection_list); 
     124  text_tarray::iterator collection_iterator = collection_list.begin(); 
     125  while (collection_iterator != collection_list.end()) 
     126  { 
     127    text_tarray colinfo; 
     128    colinfo.push_back(*collection_iterator); 
     129    colinfo.push_back(gsdlhome); 
     130    colinfo.push_back(gsdlhome); 
     131    recpt.configure("collectinfo", colinfo); 
     132    collection_iterator++; 
     133  } 
     134 
    121135  // set up the null protocol 
    122136  nproto.set_collectset(cservers); 
    123  
    124   // configure the receptionist server list 
    125   cservers->setReceptionistServers(recpt, gsdlhome);   
    126137 
    127138  // add the protocol to the receptionist