Author: cctrieloff
Date: 2007-09-08 22:00:50 -0400 (Sat, 08 Sep 2007)
New Revision: 915
Modified:
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/cpp/lib/jrnl/jdir.cpp
Log:
- comments
- errno commented
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2007-09-08 16:06:25 UTC (rev 914)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2007-09-09 02:00:50 UTC (rev 915)
@@ -208,6 +208,7 @@
{
//kpvdr TODO -- can we get rid of the copy???
+// need to delete the dtok's
std::deque<rhm::journal::data_tok*>
this_dtok_list(journal->_aio_wr_cmpl_dtok_list.begin(),
journal->_aio_wr_cmpl_dtok_list.end());
journal->_aio_wr_cmpl_dtok_list.clear();
@@ -232,6 +233,7 @@
jcntl::aio_rd_callback(jcntl* journal, u_int32_t num_dtoks)
{
//kpvdr TODO -- can we get rid of the copy???
+// need to delete the dtok's
std::deque<rhm::journal::data_tok*>
this_dtok_list(journal->_aio_rd_cmpl_dtok_list.begin(),
journal->_aio_rd_cmpl_dtok_list.end());
journal->_aio_rd_cmpl_dtok_list.clear();
Modified: store/trunk/cpp/lib/jrnl/jdir.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jdir.cpp 2007-09-08 16:06:25 UTC (rev 914)
+++ store/trunk/cpp/lib/jrnl/jdir.cpp 2007-09-09 02:00:50 UTC (rev 915)
@@ -154,14 +154,14 @@
}
}
}
- if (errno)
+/* if (errno)
{
std::stringstream ss;
ss << "dir=\"" << dirname << "\"
errno=" << errno;
::closedir(dir); // Try to close, it makes no sense to trap errors here...
throw jexception(jerrno::JERR_JDIR_READDIR, ss.str(), "jdir",
"clear_dir");
}
-#endif
+ */#endif
if (::closedir(dir))
{
std::stringstream ss;
@@ -193,6 +193,9 @@
DIR* dir = ::opendir(dirname.c_str());
if (!dir)
{
+ if (errno == ENOENT) // dir does not exist.
+ return;
+
std::stringstream ss;
ss << "dir=\"" << dirname << "\"
errno=" << errno;
throw jexception(jerrno::JERR_JDIR_OPENDIR, ss.str(), "jdir",
"delete_dir");
@@ -235,14 +238,14 @@
}
}
}
- if (errno)
+/* if (errno)
{
std::stringstream ss;
ss << "dir=\"" << dirname << "\"
errno=" << errno;
::closedir(dir); // Try to close, it makes no sense to trap errors here...
throw jexception(jerrno::JERR_JDIR_READDIR, ss.str(), "jdir",
"delete_dir");
}
- }
+ */ }
// Now dir is empty, close and delete it
if (::closedir(dir))
{
@@ -290,14 +293,14 @@
}
}
}
- if (errno)
+/* if (errno)
{
std::stringstream ss;
ss << "dir=\"" << dirname << "\"
errno=" << errno;
::closedir(dir); // Try to close, it makes no sense to trap errors here...
throw jexception(jerrno::JERR_JDIR_READDIR, ss.str(), "jdir",
"clear_dir");
}
- if (::closedir(dir))
+ */ if (::closedir(dir))
{
std::stringstream ss;
ss << "dir=\"" << dirname << "\"
errno=" << errno;
Show replies by date