Commit 7bd0340c authored by claes's avatar claes

*** empty log message ***

parent 006d7833
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
%# define load_cNameDistribute "$pwrp_root/common/db/pwrp_cnf_distribute.dat" %# define load_cNameDistribute "$pwrp_root/common/db/pwrp_cnf_distribute.dat"
%# define load_cNameSysObject "$pwrp_root/common/db/pwrp_cnf_sysobject.dat" %# define load_cNameSysObject "$pwrp_root/common/db/pwrp_cnf_sysobject.dat"
%# define load_cNameFilePath "$pwrp_root/common/db/pwrp_cnf_dirlist.dat" %# define load_cNameFilePath "$pwrp_root/common/db/pwrp_cnf_dirlist.dat"
%# define load_cNameLocalWb "$pwrp_root/common/db/wb.wb_load"
%# define load_cNameGblVolumeList "$pwra_db/pwr_volumelist.dat" %# define load_cNameGblVolumeList "$pwra_db/pwr_volumelist.dat"
%# define load_cNameCmnVolumeList "pwr_volumelist.dat" %# define load_cNameCmnVolumeList "pwr_volumelist.dat"
%# define load_cNameRttCrr "rtt_crr_%3.3d_%3.3d_%3.3d_%3.3d.dat" %# define load_cNameRttCrr "rtt_crr_%3.3d_%3.3d_%3.3d_%3.3d.dat"
......
...@@ -89,6 +89,12 @@ wb_vrep *wb_erep::volume(pwr_tStatus *sts, const char *name) // Fix ...@@ -89,6 +89,12 @@ wb_vrep *wb_erep::volume(pwr_tStatus *sts, const char *name) // Fix
return it->second; return it->second;
} }
} }
for ( it = m_vrepextern.begin(); it != m_vrepextern.end(); it++) {
if ( cdh_NoCaseStrcmp( it->second->name(), name) == 0) {
*sts = LDH__SUCCESS;
return it->second;
}
}
*sts = LDH__NOSUCHVOL; *sts = LDH__NOSUCHVOL;
return 0; return 0;
} }
...@@ -223,6 +229,7 @@ void wb_erep::load( pwr_tStatus *sts) ...@@ -223,6 +229,7 @@ void wb_erep::load( pwr_tStatus *sts)
if ( EVEN(*sts)) return; if ( EVEN(*sts)) return;
loadMeta( sts); loadMeta( sts);
loadLocalWb( sts);
} }
void wb_erep::loadDirList( pwr_tStatus *status) void wb_erep::loadDirList( pwr_tStatus *status)
...@@ -425,6 +432,35 @@ void wb_erep::loadMeta( pwr_tStatus *status) ...@@ -425,6 +432,35 @@ void wb_erep::loadMeta( pwr_tStatus *status)
*status = LDH__SUCCESS; *status = LDH__SUCCESS;
} }
void wb_erep::loadLocalWb( pwr_tStatus *rsts)
{
pwr_tStatus sts;
char found_file[200];
sts = dcli_search_file( load_cNameLocalWb, found_file, DCLI_DIR_SEARCH_INIT);
dcli_search_file( load_cNameLocalWb, found_file, DCLI_DIR_SEARCH_END);
if ( ODD(sts)) {
try {
wb_vrepwbl *vrep = new wb_vrepwbl( this);
sts = vrep->load( found_file);
if ( ODD(sts))
addExtern( &sts, vrep);
else {
*rsts = sts;
cout << "** Failiure loading local workbench volume" << endl;
return;
}
}
catch ( wb_error& e) {
*rsts = e.sts();
cout << "** Failiure loading local workbench volume" << endl;
return ;
}
cout << "-- Local workbench volume loaded" << endl;
}
*rsts = LDH__SUCCESS;
}
wb_cdrep *wb_erep::cdrep( pwr_tStatus *sts, const wb_orep& o) wb_cdrep *wb_erep::cdrep( pwr_tStatus *sts, const wb_orep& o)
{ {
wb_vrep *vrep = volume(sts, o.vid()); wb_vrep *vrep = volume(sts, o.vid());
......
...@@ -57,6 +57,7 @@ private: ...@@ -57,6 +57,7 @@ private:
void loadDirList( pwr_tStatus *status); void loadDirList( pwr_tStatus *status);
void loadCommonMeta( pwr_tStatus *status); void loadCommonMeta( pwr_tStatus *status);
void loadMeta( pwr_tStatus *status); void loadMeta( pwr_tStatus *status);
void loadLocalWb( pwr_tStatus *sts);
}; };
#endif #endif
......
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define ldh_cWbdbVersionStr "V2.7.0" #define ldh_cWbdbVersionStr "V2.7.0"
#define ldh_cWBVol (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 254) #define ldh_cWBVol (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 254)
#define ldh_cWBVolLocal (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 252)
#define ldh_cProjectVolume (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 253) #define ldh_cProjectVolume (0 + ((pwr_tVolumeId)254 << 24) + (254 << 16) + (254 << 8) + 253)
#if 0 #if 0
......
...@@ -518,6 +518,7 @@ pwr_tStatus WVsel::load_volumelist() ...@@ -518,6 +518,7 @@ pwr_tStatus WVsel::load_volumelist()
XmString cstr; XmString cstr;
pwr_tStatus sts; pwr_tStatus sts;
int i; int i;
bool local_wbvolume = false;
XmListDeleteAllItems( widgets.volumelist); XmListDeleteAllItems( widgets.volumelist);
volume_count = 0; volume_count = 0;
...@@ -575,8 +576,17 @@ pwr_tStatus WVsel::load_volumelist() ...@@ -575,8 +576,17 @@ pwr_tStatus WVsel::load_volumelist()
volume_count++; volume_count++;
if ( volume_count >= VSEL_MAX_VOLUMES) if ( volume_count >= VSEL_MAX_VOLUMES)
break; break;
if ( local_wbvolume)
break;
sts = ldh_GetNextVolume( wbctx, volume, &volume); sts = ldh_GetNextVolume( wbctx, volume, &volume);
if ( EVEN(sts) && all) {
// Look for local workbench volume
volume = ldh_cWBVolLocal;
sts = ldh_VolumeIdToName( wbctx, volume, name, sizeof(name),
&size);
local_wbvolume = true;
}
} }
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment