[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-filesystem-cvs
Subject:    [Filesystem-cvs] local/full smplfsys.cpp,1.18,1.19
From:       ehodge () helixcommunity ! org
Date:       2004-12-17 20:25:51
[Download RAW message or body]

Update of /cvsroot/filesystem/local/full
In directory cvs-new:/tmp/cvs-serv27639/full

Modified Files:
	smplfsys.cpp 
Log Message:
Fixes cases where local, non-progressive-download files were
erroneously getting progressive download status reports 
(PR 130518).

Reviewed by:   bobclark@real.com


Index: smplfsys.cpp
===================================================================
RCS file: /cvsroot/filesystem/local/full/smplfsys.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- smplfsys.cpp	15 Dec 2004 21:37:27 -0000	1.18
+++ smplfsys.cpp	17 Dec 2004 20:25:49 -0000	1.19
@@ -1290,12 +1290,24 @@
     // is not defined
     if (m_pProgDownMon && m_bProgDownEnabled)
     {
+        BOOL bIsProgressive = m_pProgDownMon->HasBeenProgressive()  &&
+                m_pProgDownMon->IsProgressive();
+
 #if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS)
         UINT32 ulPrevFileSize = m_pProgDownMon->GetLastFileSize();
         m_pProgDownMon->MonitorFileSize(); // updates lastFileSize.
         UINT32 ulCurFileSize = m_pProgDownMon->GetLastFileSize();
 
-        MaybeDoProgressiveDownloadStatusRept(ulPrevFileSize, ulCurFileSize);
+        // /If we know the complete file size from URL options and it
+        // differs from current file size stat'd so far, it's progressive:
+        if (IsPrgDnCompleteFileSizeKnown())
+        {
+            bIsProgressive = (m_ulPrgDnTotalFileSize > ulCurFileSize);
+        }
+        if (bIsProgressive)
+        {
+            MaybeDoProgressiveDownloadStatusRept(ulPrevFileSize, ulCurFileSize);
+        }
 
         // /To fix PR 129618 so we get callbacks when we haven't yet hit EOF
         // and TLC is paused (waiting for more data or by user), we need to
@@ -1320,17 +1332,6 @@
             MLOG_PD(NULL, "\t\t******** FAILED to read requested bytes\n");
             // The read failed to read all the requested bytes
             //
-
-            BOOL bIsProgressive = m_pProgDownMon->HasBeenProgressive()  &&
-                    m_pProgDownMon->IsProgressive();
-#if defined(HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS)
-            // /If we know the complete file size from URL options and it
-            // differs from current file size stat'd so far, it's progressive:
-            if (IsPrgDnCompleteFileSizeKnown())
-            {
-                bIsProgressive = (m_ulPrgDnTotalFileSize > ulCurFileSize);
-            }
-#endif // /HELIX_FEATURE_PROGRESSIVE_DOWNLD_STATUS.
 
             // Do we have a history of progressive download
             // with this file?



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic