- Timestamp:
- 2000-07-13T10:21:53+12:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/New_Config_Format-branch/gsdl/src/recpt/queryaction.cpp
r962 r1279 28 28 /* 29 29 $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 30 37 Revision 1.36 2000/02/21 21:57:48 sjboddie 31 38 actions are now configured with gsdlhome … … 177 184 queryaction::queryaction () { 178 185 186 recpt = NULL; 179 187 num_phrases = 0; 180 188 … … 695 703 ostream &textout, ostream &logout) { 696 704 697 ColInfoResponse_t cinfo;705 ColInfoResponse_t *cinfo = NULL; 698 706 comerror_t err; 699 707 InfoFilterOptionsResponse_t fresponse; … … 737 745 while (collist_here != collist_end) { 738 746 739 (*rprotolist_here).p->get_collectinfo (*collist_here, cinfo, err, logout);747 cinfo = recpt->get_collectinfo_ptr ((*rprotolist_here).p, *collist_here, logout); 740 748 // if (err == noError && cinfo.isPublic && (cinfo.buildDate > 0)) { 741 if ( err == noError && (cinfo.buildDate > 0)) {749 if (cinfo != NULL && (cinfo->buildDate > 0)) { 742 750 743 751 (*rprotolist_here).p->get_filteroptions (*collist_here, frequest, fresponse, err, logout); … … 789 797 << " name=cc value=\"" << *collist_here << "\">"; 790 798 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"]; 793 801 else 794 802 textout << outconvert << *collist_here; … … 816 824 ostream &logout) { 817 825 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 818 834 if (args["ccs"] == "1") { 819 835 if (!args["cc"].empty()) { … … 866 882 map<text_t, colinfo_t, lttext_t> colinfomap; 867 883 868 ColInfoResponse_t cinfo;884 ColInfoResponse_t *cinfo = NULL; 869 885 comerror_t err; 870 886 FilterRequest_t request; … … 906 922 continue; 907 923 } 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 } 909 930 910 931 browserclass *bptr = browsers->getbrowser (browsertype); … … 913 934 text_t formatstring; 914 935 if (!get_formatstring (classification, browsertype, 915 cinfo .format, formatstring))936 cinfo->format, formatstring)) 916 937 formatstring = bptr->get_default_formatstring(); 917 938 … … 1069 1090 text_t classification = "Search"; 1070 1091 1071 ColInfoResponse_t cinfo;1072 1092 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 } 1074 1099 1075 1100 browserclass *bptr = browsers->getbrowser (browsertype); … … 1078 1103 text_t formatstring; 1079 1104 if (!get_formatstring (classification, browsertype, 1080 cinfo .format, formatstring))1105 cinfo->format, formatstring)) 1081 1106 formatstring = bptr->get_default_formatstring(); 1082 1107
Note:
See TracChangeset
for help on using the changeset viewer.