Author: alanmc
Date: 2007-06-12 16:17:57 -0400 (Tue, 12 Jun 2007)
New Revision: 79338

Modified:
   trunk/bitsharp/src/MonoTorrent/ChangeLog
   trunk/bitsharp/src/MonoTorrent/Client/Encryption/RC4.cs
   trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs
   trunk/bitsharp/src/MonoTorrent/Client/RateLimiter.cs
Log:
* Client/RateLimiter.cs: Fixed typo where i was using the wrong
  variable when calculating the increaseAmount. Should have more
  stable rate control now.
* Client/Encryption/RC4.cs: Key is never used, commented it out
* Client/Managers/ConnectionManager.cs: Commented out unused variables

Modified: trunk/bitsharp/src/MonoTorrent/ChangeLog
===================================================================
--- trunk/bitsharp/src/MonoTorrent/ChangeLog    2007-06-12 20:16:50 UTC (rev 
79337)
+++ trunk/bitsharp/src/MonoTorrent/ChangeLog    2007-06-12 20:17:57 UTC (rev 
79338)
@@ -1,5 +1,13 @@
 2007-06-12  Alan McGovern <[EMAIL PROTECTED]> 
 
+       * Client/RateLimiter.cs: Fixed typo where i was using the wrong
+         variable when calculating the increaseAmount. Should have more
+         stable rate control now.
+       * Client/Encryption/RC4.cs: Key is never used, commented it out
+       * Client/Managers/ConnectionManager.cs: Commented out unused variables
+
+2007-06-12  Alan McGovern <[EMAIL PROTECTED]> 
+
        Removed typo
 
 2007-05-31  Alan McGovern <[EMAIL PROTECTED]> 

Modified: trunk/bitsharp/src/MonoTorrent/Client/Encryption/RC4.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Encryption/RC4.cs     2007-06-12 
20:16:50 UTC (rev 79337)
+++ trunk/bitsharp/src/MonoTorrent/Client/Encryption/RC4.cs     2007-06-12 
20:17:57 UTC (rev 79338)
@@ -41,7 +41,7 @@
     {
         static RandomNumberGenerator random = RandomNumberGenerator.Create();
 
-        byte[] key;
+        //byte[] key;
 
         byte[] S = new byte[256];
         int x;
@@ -49,7 +49,7 @@
 
         public RC4(byte[] key)
         {
-            this.key = key;
+            //this.key = key;
 
             for (int i = 0; i <= 255; i++)
                 S[i] = (byte)i;

Modified: trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs 
2007-06-12 20:16:50 UTC (rev 79337)
+++ trunk/bitsharp/src/MonoTorrent/Client/Managers/ConnectionManager.cs 
2007-06-12 20:17:57 UTC (rev 79338)
@@ -191,7 +191,7 @@
                 {
                     
id.Peer.Connection.BeginConnect(this.endCreateConnectionCallback, id);
                 }
-                catch (SocketException ex)
+                catch (SocketException)
                 {
                     // If there's a socket exception at this point, just drop 
the peer's details silently
                     // as they must be invalid.
@@ -511,7 +511,7 @@
                     msg.Handle(id);
 
                     Logger.Log(id, "Handshake recieved");
-                    HandshakeMessage handshake = msg as HandshakeMessage;
+                    //HandshakeMessage handshake = msg as HandshakeMessage;
 
                     if (id.Peer.Connection.SupportsFastPeer && 
ClientEngine.SupportsFastPeer)
                     {

Modified: trunk/bitsharp/src/MonoTorrent/Client/RateLimiter.cs
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Client/RateLimiter.cs        2007-06-12 
20:16:50 UTC (rev 79337)
+++ trunk/bitsharp/src/MonoTorrent/Client/RateLimiter.cs        2007-06-12 
20:17:57 UTC (rev 79338)
@@ -59,12 +59,12 @@
             this.SavedErrorUpload = errorRateUp;
 
 
-            int increaseAmount = (int)((maxDownloadSpeed + 
this.SavedErrorDownload) / ConnectionManager.ChunkLength);
+            int increaseAmount = (int)((maxDownloadSpeed + changeAmountDown) / 
ConnectionManager.ChunkLength);
             Interlocked.Add(ref this.DownloadChunks, increaseAmount);
             if (this.DownloadChunks > (increaseAmount * 3))
                 Interlocked.Exchange(ref this.DownloadChunks, (increaseAmount 
* 3));
 
-            increaseAmount = (int)((maxUploadSpeed + this.SavedErrorUpload) / 
ConnectionManager.ChunkLength);
+            increaseAmount = (int)((maxUploadSpeed + changeAmountUp) / 
ConnectionManager.ChunkLength);
             Interlocked.Add(ref this.UploadChunks, increaseAmount);
             if (this.UploadChunks > increaseAmount * 3)
                 Interlocked.Exchange(ref this.UploadChunks, (increaseAmount * 
3));

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to