[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-filesystem-cvs
Subject: [Filesystem-cvs] local/full smplfsys.cpp,1.32,1.33
From: cdunn () helixcommunity ! org
Date: 2006-03-17 19:44:44
[Download RAW message or body]
Update of /cvsroot/filesystem/local/full
In directory cvs:/tmp/cvs-serv3196
Modified Files:
smplfsys.cpp
Log Message:
Add check for new Read codes returned from IHXDataFile::Read
Index: smplfsys.cpp
===================================================================
RCS file: /cvsroot/filesystem/local/full/smplfsys.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- smplfsys.cpp 8 Mar 2006 19:25:59 -0000 1.32
+++ smplfsys.cpp 17 Mar 2006 19:44:42 -0000 1.33
@@ -1282,6 +1282,46 @@
IHXBuffer* pBuffer = NULL;
ULONG32 actual = m_pDataFile->Read(pBuffer, ulCount);
+ // Check for IHXDataFile::Read status codes, if we did not get the number of bytes requested,
+ // otherwise use PD logic
+ if ((INT32)actual < (INT32)ulCount)
+ {
+ switch ((INT32)actual)
+ {
+ case HX_FILESTATUS_FATAL_ERROR :
+ case HX_FILESTATUS_ERROR :
+ case HX_FILESTATUS_LOGICAL_EOF :
+ {
+ HXLOGL3(HXLOG_GENE,"DoRead()******** FAILED to read requested bytes, error code=%ld", actual);
+ rbProgFail = FALSE;
+ return FinishDoRead(0, pBuffer);
+ }
+ break;
+ case HX_FILESTATUS_DATA_PENDING :
+ {
+ HXLOGL3(HXLOG_GENE,"DoRead()******** FAILED to read requested bytes, data pending");
+ if (m_bAsyncAccess)
+ {
+ // Set the flag saying we failed due to progressive download
+ rbProgFail = TRUE;
+ HX_RELEASE(pBuffer);
+ // Schedule the callback
+ return FinishDoReadWithCallback(actual);
+ }
+ else
+ {
+ HX_RELEASE(pBuffer);
+ // Try synchronously
+ return FinishDoReadWithoutCallback(actual);
+ }
+ }
+ break;
+ default:
+ // do nothing
+ break;
+ }
+ }
+
#if defined(HELIX_FEATURE_PROGDOWN)
MLOG_PD(NULL, "\tulCount = %lu actual = %lu\n", ulCount, actual);
// Sanity check. Unlikely we'd even make it here
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic