[sword-svn] r3519 - in trunk/src: keys modules/common

scribe at crosswire.org scribe at crosswire.org
Thu Nov 2 18:31:11 MST 2017


Author: scribe
Date: 2017-11-02 18:31:11 -0700 (Thu, 02 Nov 2017)
New Revision: 3519

Modified:
   trunk/src/keys/treekeyidx.cpp
   trunk/src/modules/common/rawstr.cpp
   trunk/src/modules/common/rawstr4.cpp
   trunk/src/modules/common/zstr.cpp
Log:
Since we 'fixed' checking for file open error, we get file open errors all the time now.  Some are OK.  Changed output to something readable and changed level to debug.

Modified: trunk/src/keys/treekeyidx.cpp
===================================================================
--- trunk/src/keys/treekeyidx.cpp	2017-11-02 11:42:24 UTC (rev 3518)
+++ trunk/src/keys/treekeyidx.cpp	2017-11-03 01:31:11 UTC (rev 3519)
@@ -63,7 +63,9 @@
 	datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
 
 	if (!datfd || datfd->getFd() < 0) {
-		SWLog::getSystemLog()->logError("%d", errno);
+		// couldn't find datafile but this might be fine if we're
+		// merely instantiating a remote InstallMgr SWMgr
+		SWLog::getSystemLog()->logDebug("Couldn't open file: %s. errno: %d", buf.c_str(), errno);
 		error = errno;
 	}
 	else {

Modified: trunk/src/modules/common/rawstr.cpp
===================================================================
--- trunk/src/modules/common/rawstr.cpp	2017-11-02 11:42:24 UTC (rev 3518)
+++ trunk/src/modules/common/rawstr.cpp	2017-11-03 01:31:11 UTC (rev 3519)
@@ -75,7 +75,9 @@
 	datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
 
 	if (!datfd || datfd->getFd() < 0) {
-		SWLog::getSystemLog()->logError("%d", errno);
+		// couldn't find datafile but this might be fine if we're
+		// merely instantiating a remote InstallMgr SWMgr
+		SWLog::getSystemLog()->logDebug("Couldn't open file: %s. errno: %d", buf.c_str(), errno);
 	}
 
 	instance++;

Modified: trunk/src/modules/common/rawstr4.cpp
===================================================================
--- trunk/src/modules/common/rawstr4.cpp	2017-11-02 11:42:24 UTC (rev 3518)
+++ trunk/src/modules/common/rawstr4.cpp	2017-11-03 01:31:11 UTC (rev 3519)
@@ -75,7 +75,9 @@
 	datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
 
 	if (!datfd || datfd->getFd() < 0) {
-		SWLog::getSystemLog()->logError("%d", errno);
+		// couldn't find datafile but this might be fine if we're
+		// merely instantiating a remote InstallMgr SWMgr
+		SWLog::getSystemLog()->logDebug("Couldn't open file: %s. errno: %d", buf.c_str(), errno);
 	}
 
 	instance++;

Modified: trunk/src/modules/common/zstr.cpp
===================================================================
--- trunk/src/modules/common/zstr.cpp	2017-11-02 11:42:24 UTC (rev 3518)
+++ trunk/src/modules/common/zstr.cpp	2017-11-03 01:31:11 UTC (rev 3519)
@@ -83,8 +83,10 @@
 	buf.setFormatted("%s.zdt", path);
 	zdtfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
 
-	if (!datfd || datfd->getFd() < 0) {
-		SWLog::getSystemLog()->logError("%d", errno);
+	if (!zdtfd || zdtfd->getFd() < 0) {
+		// couldn't find datafile but this might be fine if we're
+		// merely instantiating a remote InstallMgr SWMgr
+		SWLog::getSystemLog()->logDebug("Couldn't open file: %s. errno: %d", buf.c_str(), errno);
 	}
 
 	cacheBlock = 0;




More information about the sword-cvs mailing list