Changeset 15584 for gsdl/trunk/src/colservr/lucenegdbmsource.cpp
- Timestamp:
- 2008-05-20T10:22:16+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/src/colservr/lucenegdbmsource.cpp
r15162 r15584 44 44 outconvertclass text_t2ascii; 45 45 err = noError; 46 if ( gdbmptr == NULL) {46 if (db_ptr == NULL) { 47 47 // most likely a configuration problem 48 48 logout << text_t2ascii 49 << "configuration error: lucenegdbmsource contains a null gdbmclass\n\n";49 << "configuration error: lucenegdbmsource contains a null dbclass\n\n"; 50 50 err = configurationError; 51 51 return true; … … 53 53 54 54 // open the database 55 gdbmptr->setlogout(&logout); 56 if (!gdbmptr->opendatabase (gdbm_filename, GDBM_READER, 100, false)) { 57 // most likely a system problem (we have already checked that the 58 // gdbm database exists) 55 db_ptr->setlogout(&logout); 56 if (!db_ptr->opendatabase (db_filename, DB_READER, 100, false)) { 57 // most likely a system problem (we have already checked that the database exists) 59 58 logout << text_t2ascii 60 << "system problem: open on gdbm database \"" 61 << gdbm_filename << "\" failed\n\n"; 59 << "system problem: open on database \"" << db_filename << "\" failed\n\n"; 62 60 err = systemProblem; 63 61 return true; … … 68 66 translate_OID (OID, tOID, err, logout); 69 67 infodbclass info; 70 if (! gdbmptr->getinfo(tOID, info)) {71 gdbmptr->closedatabase(); // Important that local library doesn't leave any files open68 if (!db_ptr->getinfo(tOID, info)) { 69 db_ptr->closedatabase(); // Important that local library doesn't leave any files open 72 70 return false; 73 71 } … … 82 80 get_top(tOID, parent_OID); 83 81 84 // locate the parent info ingdbm db 85 if (!gdbmptr->getinfo(parent_OID, info)) { 86 gdbmptr->closedatabase(); // Important that local library doesn't leave any files open 82 if (!db_ptr->getinfo(parent_OID, info)) { 83 db_ptr->closedatabase(); // Important that local library doesn't leave any files open 87 84 return false; 88 85 } … … 92 89 93 90 doc.clear(); 94 gdbmptr->closedatabase(); // Important that local library doesn't leave any files open91 db_ptr->closedatabase(); // Important that local library doesn't leave any files open 95 92 expat_document(full_path_to_doc, ((lucenesearchclass*)textsearchptr)->gdbm_level, text_t(docnum), doc); 96 93 return true;
Note:
See TracChangeset
for help on using the changeset viewer.