Ignore:
Timestamp:
2001-04-30T10:44:08+12:00 (23 years ago)
Author:
sjboddie
Message:

Made the web library print some more reasonable debug info if gsdlhome
isn't set to a valid value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/librarymain.cpp

    r1937 r2344  
    7070  collectset  *cservers;
    7171#if defined(USE_Z3950)
    72   /*#ifndef __WIN32__*/
    7372  z3950proto   zproto;
    7473#endif
     
    7776  cservers = new collectset(gsdlhome);
    7877
    79   // GRB: removed 7/9/2000; perhaps needs to be here!site_cfg_read (gsdlhome);
    80 
    8178  // set up the null protocol
    8279  nproto.set_collectset(cservers);
     
    8481  // configure the receptionist server list
    8582  cservers->setReceptionistServers(recpt, gsdlhome); 
    86  
    87  
    88   /*
    89   text_t collectdir = filename_cat (gsdlhome, "collect");
    90   text_tarray collections;
    91   read_dir (collectdir, collections);
    92 
    93   text_tarray::const_iterator thiscol = collections.begin();
    94   text_tarray::const_iterator endcol = collections.end();
    95 
    96   while (thiscol != endcol) {
    97 
    98     // ignore the modelcol
    99     if (*thiscol == "modelcol") {
    100       thiscol ++;
    101       continue;
    102     }
    103    
    104     // create collection server and add to null protocol
    105     nproto.add_collection (*thiscol, &recpt, gsdlhome, gsdlhome);
    106    
    107     confin.close();
    108 // #endif ? does this tie in with a WIN32 ifdef?
    109 
    110     collectserver *cserver = new collectserver();
    111     gdbmclass *gdbmhandler = new gdbmclass();
    112 
    113     // add a null filter
    114     filterclass *filter = new filterclass ();
    115     cserver->add_filter (filter);
    116    
    117     // add a browse filter
    118     browsefilterclass *browsefilter = new browsefilterclass();
    119     browsefilter->set_gdbmptr (gdbmhandler);
    120 
    121     cserver->add_filter (browsefilter); 
    122 
    123     if (buildtype == "mg") {
    124        mgsearchclass *mgsearch = new mgsearchclass();
    125  
    126        // add a query filter
    127        mgqueryfilterclass *queryfilter = new mgqueryfilterclass();
    128        queryfilter->set_gdbmptr (gdbmhandler);
    129        queryfilter->set_mgsearchptr (mgsearch);
    130        cserver->add_filter (queryfilter);
    131        
    132        // add a mg and gdbm source
    133        mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass ();
    134        mggdbmsource->set_gdbmptr (gdbmhandler);
    135        mggdbmsource->set_mgsearchptr (mgsearch);
    136        cserver->add_source (mggdbmsource);
    137     }
    138 #ifndef __WIN32__
    139 
    140     else if (buildtype == "mgpp") {
    141      
    142       mgppsearchclass *mgsearch = new mgppsearchclass();
    143 
    144       // add a query filter
    145       mgppqueryfilterclass *queryfilter = new mgppqueryfilterclass();
    146       queryfilter->set_gdbmptr (gdbmhandler);
    147       queryfilter->set_mgsearchptr (mgsearch);
    148       cserver->add_filter (queryfilter);
    149      
    150       // add a mg and gdbm source
    151       mggdbmsourceclass *mggdbmsource = new mggdbmsourceclass ();
    152       mggdbmsource->set_gdbmptr (gdbmhandler);
    153       mggdbmsource->set_mgsearchptr (mgsearch);
    154       cserver->add_source (mggdbmsource);
    155    
    156     }
    157 #endif   
    158 
    159     // inform collection server and everything it contains about its
    160     // collection name
    161     cserver->configure ("collection", *thiscol);
    162  
    163     // configure receptionist's collectinfo structure
    164     text_tarray colinfo;
    165     colinfo.push_back (*thiscol);
    166     colinfo.push_back (gsdlhome);
    167     colinfo.push_back (gsdlhome);
    168     recpt.configure ("collectinfo", colinfo);
    169    
    170     nproto.add_collectserver (cserver);
    171     thiscol ++;
    172   }
    173   */
    17483
    17584  // add the protocol to the receptionist
     
    17887  // z39.50 stuff - johnmcp
    17988#if defined(USE_Z3950)
    180   /*#ifndef __WIN32__*/
    18189  // add the z39.50 server information. Read in the file
    18290  // etc/recpt/z3950.cfg for list of servers and their databases.
Note: See TracChangeset for help on using the changeset viewer.