Commit fb6deb92 authored by claes's avatar claes

*** empty log message ***

parent c02f126a
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "wb_erep.h" #include "wb_erep.h"
#include "wb_merep.h" #include "wb_merep.h"
#include "wb_vrepwbl.h" // Should be wb_vrepdbs.h ... #include "wb_vrepwbl.h" // Should be wb_vrepdbs.h ...
#include "wb_vrepdbs.h"
#include "wb_cdrep.h" #include "wb_cdrep.h"
#include "wb_orep.h" #include "wb_orep.h"
#include "wb_tdrep.h" #include "wb_tdrep.h"
...@@ -296,9 +297,15 @@ void wb_erep::loadCommonMeta( pwr_tStatus *status) ...@@ -296,9 +297,15 @@ void wb_erep::loadCommonMeta( pwr_tStatus *status)
cdh_StringToVolumeId( vol_array[1], &vid); cdh_StringToVolumeId( vol_array[1], &vid);
cout << "Loading volume: " << vname << " " << vid << endl; cout << "Loading volume: " << vname << " " << vid << endl;
wb_vrepwbl *vrep = new wb_vrepwbl( this, vid); try {
vrep->name( vol_array[0]); wb_vrepdbs *vrep = new wb_vrepdbs( this, vname);
addDbs( &sts, vrep); vrep->load();
// vrep->name( vol_array[0]);
addDbs( &sts, vrep);
}
catch ( wb_error& e) {
cout << "** Unable to open volume " << vname << " " << e.what() << endl;
}
} }
fpm.close(); fpm.close();
} }
...@@ -315,7 +322,7 @@ void wb_erep::loadMeta( pwr_tStatus *status) ...@@ -315,7 +322,7 @@ void wb_erep::loadMeta( pwr_tStatus *status)
int i; int i;
pwr_tVid vid; pwr_tVid vid;
pwr_tStatus sts; pwr_tStatus sts;
wb_vrepwbl *vrep; wb_vrepdbs *vrep;
int vol_cnt = 0; int vol_cnt = 0;
strcpy( fname, load_cNameVolumeList); strcpy( fname, load_cNameVolumeList);
...@@ -370,9 +377,15 @@ void wb_erep::loadMeta( pwr_tStatus *status) ...@@ -370,9 +377,15 @@ void wb_erep::loadMeta( pwr_tStatus *status)
if ( ODD(sts)) { if ( ODD(sts)) {
cout << "Found: " << found_file << endl; cout << "Found: " << found_file << endl;
// Load... // Load...
vrep = new wb_vrepwbl( this, vid); try {
vrep->name( vol_array[0]); vrep = new wb_vrepdbs( this, vname);
addDbs( &sts, vrep); vrep->load();
// vrep->name( vol_array[0]);
addDbs( &sts, vrep);
}
catch ( wb_error& e) {
cout << "** Unable to open volume " << vname << " " << e.what() << endl;
}
break; break;
} }
} }
...@@ -385,9 +398,9 @@ void wb_erep::loadMeta( pwr_tStatus *status) ...@@ -385,9 +398,9 @@ void wb_erep::loadMeta( pwr_tStatus *status)
strcat( vname, ".dbs"); strcat( vname, ".dbs");
dcli_translate_filename( vname, vname); dcli_translate_filename( vname, vname);
vrep = new wb_vrepwbl( this, vid); wb_vrepwbl *vrepdb = new wb_vrepwbl( this, vid); // Should be wb_vrepdb...
vrep->name(vol_array[0]); vrepdb->name(vol_array[0]);
addDbs( &sts, vrep); addDbs( &sts, vrepdb);
vol_cnt++; vol_cnt++;
} }
} }
......
#include "wb_volume.h" #include "wb_volume.h"
#include "wb_merep.h" #include "wb_merep.h"
wb_volume::wb_volume() : wb_status(LDH__NOSUCHVOL), m_vrep(0), m_vid(0) wb_volume::wb_volume() : wb_status(LDH__NOSUCHVOL), m_vrep(0)
{ {
} }
...@@ -10,7 +10,6 @@ wb_volume::wb_volume(wb_vrep *vrep) : wb_status(LDH__SUCCESS), m_vrep(vrep) ...@@ -10,7 +10,6 @@ wb_volume::wb_volume(wb_vrep *vrep) : wb_status(LDH__SUCCESS), m_vrep(vrep)
if ( !m_vrep) if ( !m_vrep)
m_sts = LDH__NOSUCHVOL; m_sts = LDH__NOSUCHVOL;
else { else {
m_vid = m_vrep->vid();
m_vrep->ref(); m_vrep->ref();
} }
} }
...@@ -21,7 +20,7 @@ wb_volume::~wb_volume() ...@@ -21,7 +20,7 @@ wb_volume::~wb_volume()
m_vrep->unref(); m_vrep->unref();
} }
wb_volume::wb_volume( const wb_volume &v) : wb_status(v.sts()), m_vrep(v.m_vrep), m_vid(v.vid()) wb_volume::wb_volume( const wb_volume &v) : wb_status(v.sts()), m_vrep(v.m_vrep)
{ {
if ( m_vrep) if ( m_vrep)
m_vrep->ref(); m_vrep->ref();
...@@ -37,7 +36,6 @@ wb_volume& wb_volume::operator=(const wb_volume& x) ...@@ -37,7 +36,6 @@ wb_volume& wb_volume::operator=(const wb_volume& x)
m_vrep->unref(); m_vrep->unref();
m_vrep = x.m_vrep; m_vrep = x.m_vrep;
m_sts = x.sts(); m_sts = x.sts();
m_vid = x.vid();
return *this; return *this;
} }
......
...@@ -22,7 +22,6 @@ class wb_volume : public wb_status ...@@ -22,7 +22,6 @@ class wb_volume : public wb_status
{ {
protected: protected:
wb_vrep *m_vrep; wb_vrep *m_vrep;
pwr_tVid m_vid;
public: public:
...@@ -41,7 +40,7 @@ public: ...@@ -41,7 +40,7 @@ public:
wb_env env(); wb_env env();
pwr_tVid vid() const { return m_vid;} pwr_tVid vid() const { return m_vrep->vid();}
pwr_tCid cid() const { return m_vrep->cid();} pwr_tCid cid() const { return m_vrep->cid();}
char *name() const { return m_vrep->name();} char *name() const { return m_vrep->name();}
......
...@@ -284,13 +284,13 @@ wb_vrepdbs::cid() const ...@@ -284,13 +284,13 @@ wb_vrepdbs::cid() const
pwr_tVid pwr_tVid
wb_vrepdbs::vid() const wb_vrepdbs::vid() const
{ {
return 0; return m_vid;
} }
wb_erep * wb_erep *
wb_vrepdbs::erep() const wb_vrepdbs::erep() const
{ {
return 0; return m_erep;
} }
wb_vrep * wb_vrep *
......
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