Ignore:
Timestamp:
2000-07-13T10:21:53+12:00 (24 years ago)
Author:
sjboddie
Message:

merged changes to trunk into New_Config_Format branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/New_Config_Format-branch/gsdl/src/recpt/queryaction.cpp

    r962 r1279  
    2828/*
    2929   $Log$
     30   Revision 1.36.4.1  2000/07/12 22:21:43  sjboddie
     31   merged changes to trunk into New_Config_Format branch
     32
     33   Revision 1.37  2000/07/05 21:49:34  sjboddie
     34   Receptionist now caches collection information to avoid making multiple
     35   get_collectinfo calls to collection server
     36
    3037   Revision 1.36  2000/02/21 21:57:48  sjboddie
    3138   actions are now configured with gsdlhome
     
    177184queryaction::queryaction () {
    178185
     186  recpt = NULL;
    179187  num_phrases = 0;
    180188
     
    695703                  ostream &textout, ostream &logout) {
    696704
    697   ColInfoResponse_t cinfo;
     705  ColInfoResponse_t *cinfo = NULL;
    698706  comerror_t err;
    699707  InfoFilterOptionsResponse_t fresponse;
     
    737745    while (collist_here != collist_end) {
    738746     
    739       (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, logout);
     747      cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout);
    740748      //      if (err == noError && cinfo.isPublic && (cinfo.buildDate > 0)) {
    741       if (err == noError && (cinfo.buildDate > 0)) {
     749      if (cinfo != NULL && (cinfo->buildDate > 0)) {
    742750       
    743751        (*rprotolist_here).p->get_filteroptions (*collist_here, frequest, fresponse, err, logout);
     
    789797              << " name=cc value=\"" << *collist_here << "\">";
    790798         
    791           if (!cinfo.collectionmeta["collectionname"].empty())
    792         textout << outconvert << disp << cinfo.collectionmeta["collectionname"];
     799          if (!cinfo->collectionmeta["collectionname"].empty())
     800        textout << outconvert << disp << cinfo->collectionmeta["collectionname"];
    793801          else
    794802        textout << outconvert << *collist_here;
     
    816824                 ostream &logout) {
    817825 
     826  if (recpt == NULL) {
     827    logout << "ERROR (queryaction::do_action): This action does not contain information\n"
     828       << "      about any receptionists. The method set_receptionist was probably\n"
     829       << "      not called from the module which instantiated this action.\n";
     830    return true;
     831  }
     832
     833
    818834  if (args["ccs"] == "1") {
    819835    if (!args["cc"].empty()) {
     
    866882  map<text_t, colinfo_t, lttext_t> colinfomap;
    867883
    868   ColInfoResponse_t cinfo;
     884  ColInfoResponse_t *cinfo = NULL;
    869885  comerror_t err;
    870886  FilterRequest_t request;
     
    906922      continue;
    907923    }
    908     collectproto->get_collectinfo (*col_here, cinfo, err, logout);
     924    cinfo = recpt->get_collectinfo_ptr (collectproto, *col_here, logout);
     925    if (cinfo == NULL) {
     926      logout << "ERROR (query_action::search_multiple_collections): get_collectinfo_ptr returned NULL\n";
     927      col_here ++;
     928      continue;
     929    }
    909930   
    910931    browserclass *bptr = browsers->getbrowser (browsertype);
     
    913934    text_t formatstring;
    914935    if (!get_formatstring (classification, browsertype,
    915                cinfo.format, formatstring))
     936               cinfo->format, formatstring))
    916937      formatstring = bptr->get_default_formatstring();
    917938
     
    10691090  text_t classification = "Search";
    10701091
    1071   ColInfoResponse_t cinfo;
    10721092  comerror_t err;
    1073   collectproto->get_collectinfo (collection, cinfo, err, logout);
     1093  ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, collection, logout);
     1094
     1095  if (cinfo == NULL) {
     1096    logout << "ERROR (query_action::search_single_collection): get_collectinfo_ptr returned NULL\n";
     1097    return false;
     1098  }
    10741099   
    10751100  browserclass *bptr = browsers->getbrowser (browsertype);
     
    10781103  text_t formatstring;
    10791104  if (!get_formatstring (classification, browsertype,
    1080              cinfo.format, formatstring))
     1105             cinfo->format, formatstring))
    10811106    formatstring = bptr->get_default_formatstring();
    10821107
Note: See TracChangeset for help on using the changeset viewer.