소스 검색

revert unintended checkin

David Rose 16 년 전
부모
커밋
d0f0aeaf16
4개의 변경된 파일6개의 추가작업 그리고 15개의 파일을 삭제
  1. 2 3
      direct/src/plugin/p3dDownload.I
  2. 3 5
      direct/src/plugin/p3dDownload.cxx
  3. 1 2
      direct/src/plugin/p3dDownload.h
  4. 0 5
      direct/src/plugin/p3dPackage.cxx

+ 2 - 3
direct/src/plugin/p3dDownload.I

@@ -32,12 +32,11 @@ get_url() const {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 inline double P3DDownload::
 inline double P3DDownload::
 get_download_progress() const {
 get_download_progress() const {
-  int total_expected_data = max(_total_server_expected_data, _total_client_expected_data);
-  if (total_expected_data == 0) {
+  if (_total_expected_data == 0) {
     return 0.0;
     return 0.0;
   }
   }
 
 
-  return (double)_total_data / (double)total_expected_data;
+  return (double)_total_data / (double)_total_expected_data;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 3 - 5
direct/src/plugin/p3dDownload.cxx

@@ -24,8 +24,7 @@ P3DDownload() {
   _status = P3D_RC_in_progress;
   _status = P3D_RC_in_progress;
   _http_status_code = 0;
   _http_status_code = 0;
   _total_data = 0;
   _total_data = 0;
-  _total_client_expected_data = 0;
-  _total_server_expected_data = 0;
+  _total_expected_data = 0;
   _last_reported_time = 0;
   _last_reported_time = 0;
   
   
   _canceled = false;
   _canceled = false;
@@ -40,12 +39,11 @@ P3DDownload() {
 P3DDownload::
 P3DDownload::
 P3DDownload(const P3DDownload &copy) :
 P3DDownload(const P3DDownload &copy) :
   _url(copy._url),
   _url(copy._url),
-  _total_client_expected_data(copy._total_client_expected_data)
+  _total_expected_data(copy._total_expected_data)
 {
 {
   _status = P3D_RC_in_progress;
   _status = P3D_RC_in_progress;
   _http_status_code = 0;
   _http_status_code = 0;
   _total_data = 0;
   _total_data = 0;
-  _total_server_expected_data = 0;
   _last_reported_time = 0;
   _last_reported_time = 0;
   
   
   _canceled = false;
   _canceled = false;
@@ -117,7 +115,7 @@ feed_url_stream(P3D_result_code result_code,
     _total_data += this_data_size;
     _total_data += this_data_size;
   }
   }
 
 
-  _total_server_expected_data = max(total_expected_data, _total_data);
+  _total_expected_data = max(total_expected_data, _total_data);
 
 
   download_progress();
   download_progress();
 
 

+ 1 - 2
direct/src/plugin/p3dDownload.h

@@ -66,8 +66,7 @@ protected:
   int _http_status_code;
   int _http_status_code;
 
 
   size_t _total_data;
   size_t _total_data;
-  size_t _total_client_expected_data;
-  size_t _total_server_expected_data;
+  size_t _total_expected_data;
   time_t _last_reported_time;
   time_t _last_reported_time;
 
 
 private:
 private:

+ 0 - 5
direct/src/plugin/p3dPackage.cxx

@@ -1080,7 +1080,6 @@ Download(P3DPackage *package, DownloadType dtype, const FileSpec &file_spec) :
   _dtype(dtype),
   _dtype(dtype),
   _file_spec(file_spec)
   _file_spec(file_spec)
 {
 {
-  _total_client_expected_data = _file_spec.get_size();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -1096,7 +1095,6 @@ Download(const P3DPackage::Download &copy) :
   _dtype(copy._dtype),
   _dtype(copy._dtype),
   _file_spec(copy._file_spec)
   _file_spec(copy._file_spec)
 {
 {
-  _total_client_expected_data = _file_spec.get_size();
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -1106,9 +1104,6 @@ Download(const P3DPackage::Download &copy) :
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 void P3DPackage::Download::
 void P3DPackage::Download::
 download_progress() {
 download_progress() {
-  nout << "download_progress " << get_url() << ": " << _total_data 
-       << " of " << _total_server_expected_data << " and "
-       << _total_client_expected_data << "\n";
   P3DFileDownload::download_progress();
   P3DFileDownload::download_progress();
   assert(_package->_active_download == this);
   assert(_package->_active_download == this);