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

List:       bzflag-commits
Subject:    SF.net SVN: bzflag:[22767] trunk/bzflag
From:       bullet_catcher () users ! sourceforge ! net
Date:       2013-05-23 7:55:10
Message-ID: E1UfQMl-0004pK-LY () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 22767
          http://sourceforge.net/p/bzflag/code/22767
Author:   bullet_catcher
Date:     2013-05-23 07:55:08 +0000 (Thu, 23 May 2013)
Log Message:
-----------
Revert r22761 changes to CacheManager::addFile() and
CachedTexture::finalization() interfaces that prevent
the completion of a texture download.
Preserve const quality in a call to MD5::update().

Revision Links:
--------------
    http://sourceforge.net/p/bzflag/code/22761

Modified Paths:
--------------
    trunk/bzflag/include/CacheManager.h
    trunk/bzflag/src/bzflag/Downloads.cxx
    trunk/bzflag/src/game/CacheManager.cxx

Modified: trunk/bzflag/include/CacheManager.h
===================================================================
--- trunk/bzflag/include/CacheManager.h	2013-05-23 06:23:54 UTC (rev 22766)
+++ trunk/bzflag/include/CacheManager.h	2013-05-23 07:55:08 UTC (rev 22767)
@@ -38,7 +38,7 @@
     bool saveIndex();
 
     bool findURL(const std::string& url, CacheRecord& record);
-    bool addFile(CacheRecord& rec, const unsigned char* data);
+    bool addFile(CacheRecord& rec, const void* data);
 
     std::vector<CacheRecord> getCacheList() const;
 

Modified: trunk/bzflag/src/bzflag/Downloads.cxx
===================================================================
--- trunk/bzflag/src/bzflag/Downloads.cxx	2013-05-23 06:23:54 UTC (rev 22766)
+++ trunk/bzflag/src/bzflag/Downloads.cxx	2013-05-23 07:55:08 UTC (rev 22767)
@@ -72,7 +72,7 @@
 public:
   CachedTexture(const std::string &texUrl);
 
-  virtual void finalization(unsigned char *data, unsigned int length, bool good);
+  virtual void finalization(char *data, unsigned int length, bool good);
 
   static void  setParams(bool check, long timeout);
   static int   activeTransfer();
@@ -130,7 +130,7 @@
   byteTransferred = 0;
 }
 
-void CachedTexture::finalization(unsigned char *data, unsigned int length, bool \
good) +void CachedTexture::finalization(char *data, unsigned int length, bool good)
 {
   time_t filetime;
 

Modified: trunk/bzflag/src/game/CacheManager.cxx
===================================================================
--- trunk/bzflag/src/game/CacheManager.cxx	2013-05-23 06:23:54 UTC (rev 22766)
+++ trunk/bzflag/src/game/CacheManager.cxx	2013-05-23 07:55:08 UTC (rev 22767)
@@ -108,7 +108,7 @@
 }
 
 
-bool CacheManager::addFile(CacheRecord& record, const unsigned char* data)
+bool CacheManager::addFile(CacheRecord& record, const void* data)
 {
   if (((data == NULL) && (record.size != 0)) || (record.url.size() <= 0)) {
     return false;
@@ -135,7 +135,7 @@
   rec->usedDate = time(NULL); // update the timestamp
 
   MD5 md5;
-  md5.update(data, rec->size);
+  md5.update((const unsigned char *)data, rec->size);
   md5.finalize();
   rec->key = md5.hexdigest();
 

This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
BZFlag-commits mailing list
BZFlag-commits@lists.SourceForge.net
https://lists.SourceForge.net/lists/listinfo/bzflag-commits
irc: #BZFlag @ irc.freenode.net


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

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