Changeset 1649 for trunk/gsdl/src/recpt/collectoraction.cpp
- Timestamp:
- 2000-11-03T10:21:01+13:00 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/collectoraction.cpp
r1507 r1649 35 35 #include "cfgread.h" 36 36 #include "gsdltools.h" 37 #include "nullproto.h" 37 38 38 39 #if !defined (__WIN32__) … … 359 360 char c = fbld_in.get(); 360 361 fbld_in.close(); 361 if (c == '0') current_page = "bilddone"; 362 if (c == '0') { 363 // success - we need to create and configure a collection server for the 364 // newly built collection (for fastcgi and local library where 365 // initialization isn't going to be redone when the user clicks the 366 // "view your new collection" button 367 create_colserver (args["bc1dirname"], logout); 368 current_page = "bilddone"; 369 } 362 370 else if (c == '4' || c == '5') message = "installfail"; 363 371 else current_page = "bildfail"; … … 772 780 } 773 781 774 disp.setmacro ("statusline", "collector", statusline);782 disp.setmacro ("statusline", "collector", dm_safe(statusline)); 775 783 776 784 } … … 1163 1171 options += " -collectdir \"" + tmpdir + "\" "; 1164 1172 text_t optionfile = filename_cat (tmpdir, "mkcol.opt"); 1165 char *optionfile t= optionfile.getcstr();1166 ofstream ofile_out (optionfile t);1167 delete optionfile t;1173 char *optionfilec = optionfile.getcstr(); 1174 ofstream ofile_out (optionfilec); 1175 delete optionfilec; 1168 1176 if (!ofile_out) { 1169 1177 message = "tmpfail"; … … 1336 1344 return false; 1337 1345 } 1346 1347 // create and initialize a new collection server and 1348 // add it to the null protocol. 1349 void collectoraction::create_colserver (const text_t &collection, ostream &logout) { 1350 1351 recptprotolistclass *protos = recpt->get_recptprotolist_ptr(); 1352 recptprotolistclass::iterator rprotolist_here = protos->begin(); 1353 recptprotolistclass::iterator rprotolist_end = protos->end(); 1354 while (rprotolist_here != rprotolist_end) { 1355 if ((*rprotolist_here).p != NULL) { 1356 if ((*rprotolist_here).p->get_protocol_name () == "nullproto") { 1357 // create collection server and add it to nullproto 1358 (*rprotolist_here).p->add_collection (collection, recpt, gsdlhome, gsdlhome); 1359 // make sure gsdlhome is configured 1360 text_tarray tmp; 1361 tmp.push_back (gsdlhome); 1362 (*rprotolist_here).p->configure ("gsdlhome", tmp); 1363 // re-initialize the null protocol 1364 if (!(*rprotolist_here).p->init (logout)) { 1365 logout << "collectoraction::create_colserver: nullproto init failed\n"; 1366 } 1367 return; 1368 } 1369 } 1370 rprotolist_here ++; 1371 } 1372 1373 logout << "collectoraction::create_colserver: no valid nullproto found\n"; 1374 }
Note:
See TracChangeset
for help on using the changeset viewer.