Changeset 19611

Show
Ignore:
Timestamp:
27.05.2009 11:45:40 (10 years ago)
Author:
kjdon
Message:

changed path composition to use filename_cat instead of append, and changed location of z3950 config files to etc/packages/z3950

Location:
gsdl/trunk/runtime-src/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/recpt/librarymain.cpp

    r19062 r19611  
    9898#if defined(USE_Z3950) 
    9999  // add the z39.50 server information. Read in the file 
    100   // etc/recpt/z3950.cfg for list of servers and their databases. 
    101   text_t z3950cfg = filename_cat (gsdlhome, "etc"); 
    102   z3950cfg = filename_cat (z3950cfg, "packages"); 
    103   z3950cfg = filename_cat (z3950cfg, "z3950.cfg"); 
     100  // etc/packages/z3950/z3950.cfg for list of servers and their databases. 
     101  text_t z3950cfg = filename_cat (gsdlhome, "etc", "packages", "z3950", "z3950.cfg"); 
    104102#ifdef USE_FASTCGI 
    105103  // currently can't use z39.50 if fastcgi used 
     
    109107  if (file_exists(z3950cfg)) { 
    110108#endif 
    111     text_t z3950err = filename_cat (gsdlhome, "etc", "z3950log.txt"); 
     109    text_t z3950err = filename_cat (gsdlhome, "etc", "packages", "z3950", "z3950log.txt"); 
    112110    zproto.read_config_file(z3950cfg,z3950err); 
    113111    // only add this protocol if we have any servers configured. 
  • gsdl/trunk/runtime-src/src/z3950/z3950_to_gsdl.cpp

    r15498 r19611  
    212212    // read in the cfg file for Bib1_to_DCES 
    213213    text_t col_filename = gsdlhome; 
    214     col_filename.appendcstr("/collect/"); 
    215     col_filename.append(collectionName); 
    216     col_filename.appendcstr("/etc/bib1_to_dces.cfg"); 
     214    col_filename = filename_cat(gsdlhome, "collect", collectionName, "etc", "bib1-mapping.txt");  
    217215 
    218216    if (!bib1_to_dc_mapping(col_filename)) { 
    219       text_t site_filename = gsdlhome; 
    220       site_filename.appendcstr("/etc/bib1_to_dces.cfg"); 
     217      text_t site_filename = filename_cat(gsdlhome, "etc", "packages", "z3950", "bib1-mapping.txt"); 
    221218 
    222219      if (!bib1_to_dc_mapping(site_filename)) { 
    223     cerr << "Unable to find bib1->dublin core mapping for "  
     220    cerr << "Unable to find bib1 attribute mapping for "  
    224221         << collectionName << endl; 
    225222    cerr << "Looked for:\n  " << col_filename << "\n  "  
     
    231228 
    232229    // read in the cfg file for mapping Dublin Core to Short (internal name) 
    233     text_t build_filename = gsdlhome; 
    234     build_filename.appendcstr("/collect/"); 
    235     build_filename.append(collectionName); 
    236     build_filename.appendcstr("/index/build.cfg"); 
     230    text_t build_filename = filename_cat(gsdlhome, "collect", collectionName, "index", "build.cfg"); 
    237231 
    238232    if (!dc_to_short_mapping(build_filename,collectionName)) { 
     
    274268    this->gsdlhome = home; 
    275269    //cerr << gsdlhome.getcstr() << endl; 
    276     dirname = filename_cat(gsdlhome, "/collect"); 
     270    dirname = filename_cat(gsdlhome, "collect"); 
    277271    cdirname = dirname.getcstr(); 
    278272    if (!read_dir (cdirname, collections)) {  
     
    295289      comerror_t    error = noError; 
    296290 
    297       this->openLogfile("/etc/z3950out.txt", logout); 
     291      // openLogfile does a filename_cat with this path, changing  
     292      // the / appropriately. 
     293      this->openLogfile("/etc/packages/z3950/z3950out.txt", logout); 
    298294      reply = protocol->init(error, logout); 
    299295      logout.close();