[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi/RTIG Federation.cc
From: |
certi-cvs |
Subject: |
[certi-cvs] certi/RTIG Federation.cc |
Date: |
Thu, 30 Oct 2008 10:57:55 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 08/10/30 10:57:55
Modified files:
RTIG : Federation.cc
Log message:
end of RTIG verbosity handling
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.98&r2=3.99
Patches:
Index: Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.98
retrieving revision 3.99
diff -u -b -r3.98 -r3.99
--- Federation.cc 30 Oct 2008 10:49:28 -0000 3.98
+++ Federation.cc 30 Oct 2008 10:57:55 -0000 3.99
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: Federation.cc,v 3.98 2008/10/30 10:49:28 erk Exp $
+// $Id: Federation.cc,v 3.99 2008/10/30 10:57:55 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -163,7 +163,9 @@
// Read FOM File to initialize Root Object.
root = new RootObject(server);
+ if (verboseLevel>0) {
cout << "New federation: " << name << endl ;
+ }
// We should try to open FOM file from different
// predefined places:
@@ -177,46 +179,66 @@
//
string filename = FEDid;
bool filefound = false;
+ if (verboseLevel>0) {
cout << "Looking for FOM file... " << endl ;
cout << " Trying... " << filename;
+ }
filefound = (0==STAT_FUNCTION(filename.c_str(),&file_stat));
#ifdef _WIN32
if (!filefound) {
char temp[260];
+ if (verboseLevel>0) {
cout << " --> cannot access." <<endl;
+ }
GetCurrentDirectory(260,temp);
filename = string(temp);
filename = filename + "\\share\\federations\\"+string(FEDid_name);
+ if (verboseLevel>0) {
cout << " Now trying..." << filename;
+ }
filefound = (0==STAT_FUNCTION(filename.c_str(),&file_stat));
}
if (!filefound && (NULL!=getenv("CERTI_HOME"))) {
+ if (verboseLevel>0) {
cout << " --> cannot access." <<endl;
+ }
filename =
string(getenv("CERTI_HOME"))+"\\share\\federations\\"+FEDid_name;
+ if (verboseLevel>0) {
cout << " Now trying..." << filename;
+ }
filefound = (0==STAT_FUNCTION(filename.c_str(),&file_stat));
}
#else
if (!filefound) {
+ if (verboseLevel>0) {
cout << " --> cannot access." <<endl;
+ }
filename = "/usr/local/share/federations/"+string(FEDid_name);
+ if (verboseLevel>0) {
cout << " Now trying..." << filename;
+ }
filefound = (0==STAT_FUNCTION(filename.c_str(),&file_stat));
}
if (!filefound && (NULL!=getenv("CERTI_HOME"))) {
+ if (verboseLevel>0) {
cout << " --> cannot access." <<endl;
+ }
filename = string(getenv("CERTI_HOME"))+"/share/federations/"+FEDid_name;
+ if (verboseLevel>0) {
cout << " Now trying..." << filename;
+ }
filefound = (0==STAT_FUNCTION(filename.c_str(),&file_stat));
}
#endif
if (!filefound) {
+ if (verboseLevel>0) {
cout << " --> cannot access." <<endl;
+ }
cerr << "Next step will fail"<<endl;
G.Out(pdGendoc,"exit Federation::Federation on exception
CouldNotOpenFED");
throw CouldNotOpenFED("RTIG cannot find FED file.");
@@ -229,12 +251,16 @@
std::ifstream fedTry(FEDid.c_str());
if (!fedTry.is_open())
{
+ if (verboseLevel>0) {
cout << "... failed : ";
+ }
G.Out(pdGendoc,"exit Federation::Federation on exception
CouldNotOpenFED");
throw CouldNotOpenFED("RTIG have found but cannot open FED file");
}
else {
+ if (verboseLevel>0) {
cout << "... opened." << endl ;
+ }
fedTry.close();
}
@@ -2290,5 +2316,5 @@
}} // namespace certi/rtig
-// $Id: Federation.cc,v 3.98 2008/10/30 10:49:28 erk Exp $
+// $Id: Federation.cc,v 3.99 2008/10/30 10:57:55 erk Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi/RTIG Federation.cc,
certi-cvs <=