Changeset 1270 for trunk/gsdl/src/recpt/queryaction.cpp
- Timestamp:
- 2000-07-06T09:49:36+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/queryaction.cpp
r962 r1270 28 28 /* 29 29 $Log$ 30 Revision 1.37 2000/07/05 21:49:34 sjboddie 31 Receptionist now caches collection information to avoid making multiple 32 get_collectinfo calls to collection server 33 30 34 Revision 1.36 2000/02/21 21:57:48 sjboddie 31 35 actions are now configured with gsdlhome … … 177 181 queryaction::queryaction () { 178 182 183 recpt = NULL; 179 184 num_phrases = 0; 180 185 … … 695 700 ostream &textout, ostream &logout) { 696 701 697 ColInfoResponse_t cinfo;702 ColInfoResponse_t *cinfo = NULL; 698 703 comerror_t err; 699 704 InfoFilterOptionsResponse_t fresponse; … … 737 742 while (collist_here != collist_end) { 738 743 739 (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, logout);744 cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout); 740 745 // if (err == noError && cinfo.isPublic && (cinfo.buildDate > 0)) { 741 if ( err == noError && (cinfo.buildDate > 0)) {746 if (cinfo != NULL && (cinfo->buildDate > 0)) { 742 747 743 748 (*rprotolist_here).p->get_filteroptions (*collist_here, frequest, fresponse, err, logout); … … 789 794 << " name=cc value=\"" << *collist_here << "\">"; 790 795 791 if (!cinfo .collectionmeta["collectionname"].empty())792 textout << outconvert << disp << cinfo .collectionmeta["collectionname"];796 if (!cinfo->collectionmeta["collectionname"].empty()) 797 textout << outconvert << disp << cinfo->collectionmeta["collectionname"]; 793 798 else 794 799 textout << outconvert << *collist_here; … … 816 821 ostream &logout) { 817 822 823 if (recpt == NULL) { 824 logout << "ERROR (queryaction::do_action): This action does not contain information\n" 825 << " about any receptionists. The method set_receptionist was probably\n" 826 << " not called from the module which instantiated this action.\n"; 827 return true; 828 } 829 830 818 831 if (args["ccs"] == "1") { 819 832 if (!args["cc"].empty()) { … … 866 879 map<text_t, colinfo_t, lttext_t> colinfomap; 867 880 868 ColInfoResponse_t cinfo;881 ColInfoResponse_t *cinfo = NULL; 869 882 comerror_t err; 870 883 FilterRequest_t request; … … 906 919 continue; 907 920 } 908 collectproto->get_collectinfo (*col_here, cinfo, err, logout); 921 cinfo = recpt->get_collectinfo_ptr (collectproto, *col_here, logout); 922 if (cinfo == NULL) { 923 logout << "ERROR (query_action::search_multiple_collections): get_collectinfo_ptr returned NULL\n"; 924 col_here ++; 925 continue; 926 } 909 927 910 928 browserclass *bptr = browsers->getbrowser (browsertype); … … 913 931 text_t formatstring; 914 932 if (!get_formatstring (classification, browsertype, 915 cinfo .format, formatstring))933 cinfo->format, formatstring)) 916 934 formatstring = bptr->get_default_formatstring(); 917 935 … … 1069 1087 text_t classification = "Search"; 1070 1088 1071 ColInfoResponse_t cinfo;1072 1089 comerror_t err; 1073 collectproto->get_collectinfo (collection, cinfo, err, logout); 1090 ColInfoResponse_t *cinfo = recpt->get_collectinfo_ptr (collectproto, collection, logout); 1091 1092 if (cinfo == NULL) { 1093 logout << "ERROR (query_action::search_single_collection): get_collectinfo_ptr returned NULL\n"; 1094 return false; 1095 } 1074 1096 1075 1097 browserclass *bptr = browsers->getbrowser (browsertype); … … 1078 1100 text_t formatstring; 1079 1101 if (!get_formatstring (classification, browsertype, 1080 cinfo .format, formatstring))1102 cinfo->format, formatstring)) 1081 1103 formatstring = bptr->get_default_formatstring(); 1082 1104
Note:
See TracChangeset
for help on using the changeset viewer.