Changeset 3589

Show
Ignore:
Timestamp:
10/31/2009 04:35:26 PM (3 weeks ago)
Author:
brian
Message:

A few bugfixes to integrate configuration object.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • XrdHdfs/Makefile.am

    r3540 r3589  
    1818 
    1919libXrdHdfs_la_SOURCES = \ 
    20          XrdHdfs.cc XrdHdfs.hh 
     20         XrdHdfs.cc XrdHdfsConfig.cc XrdHdfs.hh 
    2121 
    2222libXrdHdfs_la_LDFLAGS = -lhdfs 
  • XrdHdfs/XrdHdfs.cc

    r3588 r3589  
    103103// Set up values for this directory object 
    104104// 
    105    if (XrdHdfsSS->the_N2N) { 
    106        char actual_path[XrdOssMAX_PATH_LEN+1]; 
    107        if ((retc = XrdHdfsSS->the_N2N->lfn2pfn(dir_path, actual_path, sizeof(actual_path)))) 
     105   if (XrdHdfsSS.the_N2N) { 
     106       char actual_path[XrdHdfsMAX_PATH_LEN+1]; 
     107       if ((retc = (XrdHdfsSS.the_N2N)->lfn2pfn(dir_path, actual_path, sizeof(actual_path)))) 
    108108          return retc; 
    109109          else fname = strdup(actual_path); 
     110   } else { 
     111       fname = strdup(dir_path); 
    110112   } 
    111    fname = strdup(dir_path); 
    112113   dirPos = 0; 
    113114 
     
    253254 
    254255   int retc; 
    255    if (XrdHdfsSS->the_N2N) { 
    256        char actual_path[XrdOssMAX_PATH_LEN+1]; 
    257        if ((retc = XrdHdfsSS->the_N2N->lfn2pfn(dir_path, actual_path, sizeof(actual_path)))) 
     256   if (XrdHdfsSS.the_N2N) { 
     257       char actual_path[XrdHdfsMAX_PATH_LEN+1]; 
     258       if ((retc = (XrdHdfsSS.the_N2N)->lfn2pfn(path, actual_path, sizeof(actual_path)))) 
    258259          return retc; 
    259260          else fname = strdup(actual_path); 
     261   } else { 
     262       fname = strdup(path); 
    260263   } 
    261    fname = strdup(path); 
    262264 
    263265// Set the actual open mode 
     
    505507// Do the herald thing 
    506508// 
    507    eDest.logger(lp); 
    508    eDest.Say("Copr. 2009, Brian Bockelman, Hdfs Version " XrdHdfsSVNID); 
     509   eDest = &OssEroute; 
     510   eDest->logger(lp); 
     511   eDest->Say("Copr. 2009, Brian Bockelman, Hdfs Version "); 
    509512 
    510513// Initialize the subsystems 
    511514// 
    512515   tmp = ((NoGo=Configure(configfn)) ? "failed." : "completed."); 
    513    eDest.Say("------ HDFS storage system initialization ", tmp); 
     516   eDest->Say("------ HDFS storage system initialization ", tmp); 
    514517 
    515518// All done. 
  • XrdHdfs/XrdHdfs.hh

    r3588 r3589  
    1818  
    1919#include "XrdOuc/XrdOucErrInfo.hh" 
     20#include "XrdOuc/XrdOucName2Name.hh" 
    2021  
    2122#include "XrdOss/XrdOssApi.hh" 
     
    2728class XrdSysLogger; 
    2829 
     30#define XrdHdfsMAX_PATH_LEN 1024 
    2931/******************************************************************************/ 
    3032/*                 X r d H d f s D i r e c t o r y                  */ 
     
    151153        int            Create(const char *, const char *, mode_t, XrdOucEnv &, int opts=0) {return -ENOTSUP;} 
    152154 
    153         int            Init(XrdSysLogger *, const char *) {return 0;} 
     155        int            Init(XrdSysLogger *, const char *); 
    154156 
    155157        int            getStats(char *buff, int blen) {return 0;} 
     
    189191int    xnml(XrdOucStream &Config, XrdSysError &Eroute); 
    190192 
     193static XrdSysError *eDest; 
     194 
    191195}; 
    192196#endif