Skip to content

Commit

Permalink
No longer force a new stat to be performed on an open file;
Browse files Browse the repository at this point in the history
this fails on EOS.

Fixup error messages to use the correct ToStr.
  • Loading branch information
bbockelm committed Sep 3, 2013
1 parent 3bbeb09 commit 2ee6043
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Utilities/XrdAdaptor/src/XrdFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ XrdFile::open (const char *name,
auto file = getActiveFile();
XrdCl::XRootDStatus status;
XrdCl::StatInfo *statInfo = NULL;
if (! (status = file->Stat(true, statInfo)).IsOK()) {
if (! (status = file->Stat(false, statInfo)).IsOK()) {
edm::Exception ex(edm::errors::FileOpenError);
ex << "XrdCl::File::Stat(name='" << name
<< ") => error '" << status.ToString()
<< ") => error '" << status.ToStr()
<< "' (errno=" << status.errNo << ", code=" << status.code << ")";
ex.addContext("Calling XrdFile::open()");
addConnection(ex);
Expand Down Expand Up @@ -343,7 +343,7 @@ XrdFile::write (const void *from, IOSize n)
if (!s.IsOK()) {
cms::Exception ex("FileWriteError");
ex << "XrdFile::write(name='" << m_name << "', n=" << n
<< ") failed with error '" << s.ToString()
<< ") failed with error '" << s.ToStr()
<< "' (errno=" << s.errNo << ", code=" << s.code << ")";
ex.addContext("Calling XrdFile::write()");
addConnection(ex);
Expand Down Expand Up @@ -374,7 +374,7 @@ XrdFile::write (const void *from, IOSize n, IOOffset pos)
if (!s.IsOK()) {
cms::Exception ex("FileWriteError");
ex << "XrdFile::write(name='" << m_name << "', n=" << n
<< ") failed with error '" << s.ToString()
<< ") failed with error '" << s.ToStr()
<< "' (errno=" << s.errNo << ", code=" << s.code << ")";
ex.addContext("Calling XrdFile::write()");
addConnection(ex);
Expand Down
4 changes: 2 additions & 2 deletions Utilities/XrdAdaptor/src/XrdRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ XrdAdaptor::ClientRequest::HandleResponse(XrdCl::XRootDStatus *stat, XrdCl::AnyO
edm::LogWarning("XrdAdaptorInternal") << "XrdRequestManager::handle(name='"
<< m_manager.getFilename() << ") failure when reading from "
<< (source ? source->ID() : "(unknown source)")
<< "; failed with error '" << status->ToString() << "' (errno="
<< "; failed with error '" << status->ToStr() << "' (errno="
<< status->errNo << ", code=" << status->code << ").";
m_failure_count++;
try
Expand All @@ -67,7 +67,7 @@ XrdAdaptor::ClientRequest::HandleResponse(XrdCl::XRootDStatus *stat, XrdCl::AnyO
{
edm::Exception ex(edm::errors::FileReadError);
ex << "XrdRequestManager::handle(name='" << m_manager.getFilename()
<< ") failed with error '" << status->ToString()
<< ") failed with error '" << status->ToStr()
<< "' (errno=" << status->errNo << ", code="
<< status->code << "). Unknown exception occurred when running"
<< " connection recovery.";
Expand Down
2 changes: 1 addition & 1 deletion Utilities/XrdAdaptor/src/XrdSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Source::~Source()
XrdCl::XRootDStatus status;
if (! (status = m_fh->Close()).IsOK())
edm::LogWarning("XrdFileWarning")
<< "Source::~Source() failed with error '" << status.ToString()
<< "Source::~Source() failed with error '" << status.ToStr()
<< "' (errno=" << status.errNo << ", code=" << status.code << ")";
m_fh.reset();
}
Expand Down

0 comments on commit 2ee6043

Please sign in to comment.