- Timestamp:
- 2017-02-08T18:31:18+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/colservr/collectset.cpp
r25235 r31387 335 335 336 336 // Create a dbclass of the correct type 337 dbclass *db_ptr = NULL; 337 dbclass *db_ptr = NULL; // index database in index/text 338 dbclass *oaidb_ptr = NULL; // etc/oai-inf database 338 339 339 340 if (infodbtype == "sqlite") … … 342 343 sqlitedbclass *sql_db_ptr = new sqlitedbclass(gsdlhome); 343 344 db_ptr = sql_db_ptr; 345 346 sqlitedbclass *sql_oaidb_ptr = new sqlitedbclass(gsdlhome); 347 oaidb_ptr = sql_oaidb_ptr; 344 348 345 349 // add a sql browse filter … … 364 368 mssqldbclass *mssql_db_ptr = new mssqldbclass(gsdlhome); 365 369 db_ptr = mssql_db_ptr; 370 371 mssqldbclass *mssql_oaidb_ptr = new mssqldbclass(gsdlhome); 372 oaidb_ptr = mssql_oaidb_ptr; 366 373 367 374 // add a sql browse filter … … 380 387 jdbmnaiveclass *jdbm_db_ptr = new jdbmnaiveclass(gsdlhome); 381 388 db_ptr = jdbm_db_ptr; 389 390 jdbmnaiveclass *jdbm_oaidb_ptr = new jdbmnaiveclass(gsdlhome); 391 oaidb_ptr = jdbm_oaidb_ptr; 382 392 #else 383 393 cerr << "Warning: infodbtype of 'jdbm' was not compiled in to " << endl; … … 392 402 #ifdef USE_GDBM 393 403 db_ptr = new gdbmclass(gsdlhome); 404 oaidb_ptr = new gdbmclass(gsdlhome); 394 405 #else 395 406 cerr << "Warning: infodbtype of 'gdbm' was not compiled in to " << endl; … … 405 416 browsefilterclass *browsefilter = new browsefilterclass(); 406 417 browsefilter->set_db_ptr(db_ptr); 418 // set the oaidb ptr for the browse filter. As with the db_ptr, the oaidb_ptr 419 // is not managed and deleted by the browsefilter class, but by the sourceclass 420 browsefilter->set_oaidb_ptr(oaidb_ptr); 407 421 cserver->add_filter (browsefilter); 408 422 … … 420 434 mgsourceclass *mgsource = new mgsourceclass (); 421 435 mgsource->set_db_ptr(db_ptr); 436 mgsource->set_oaidb_ptr(oaidb_ptr); 422 437 mgsource->set_textsearchptr (mgsearch); 423 438 cserver->add_source (mgsource); … … 439 454 mgppsourceclass *mgppsource = new mgppsourceclass (); 440 455 mgppsource->set_db_ptr(db_ptr); 456 mgppsource->set_oaidb_ptr(oaidb_ptr); 441 457 mgppsource->set_textsearchptr (mgppsearch); 442 458 cserver->add_source (mgppsource); … … 459 475 lucenesourceclass *lucenesource = new lucenesourceclass (); 460 476 lucenesource->set_db_ptr(db_ptr); 477 lucenesource->set_oaidb_ptr(oaidb_ptr); 461 478 lucenesource->set_textsearchptr (lucenesearch); 462 479 cserver->add_source (lucenesource);
Note:
See TracChangeset
for help on using the changeset viewer.