Author: gonzalo
Date: 2005-04-14 20:31:20 -0400 (Thu, 14 Apr 2005)
New Revision: 43018

Modified:
   trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
   trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
Log:
2005-04-14 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * SslClientStream.cs: MemoryStream does not implement proper Begin*
        methods, so we need this to prevent infinite recursion if we have a
        callback that calls BeginRead.



Modified: trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog
===================================================================
--- trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog  
2005-04-14 23:03:31 UTC (rev 43017)
+++ trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/ChangeLog  
2005-04-15 00:31:20 UTC (rev 43018)
@@ -1,3 +1,9 @@
+2005-04-14 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * SslClientStream.cs: MemoryStream does not implement proper Begin*
+       methods, so we need this to prevent infinite recursion if we have a
+       callback that calls BeginRead.
+
 2005-04-13  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * RecordProtocol.cs: Some API changes so a record can be decoded from

Modified: 
trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs
===================================================================
--- trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs 
2005-04-14 23:03:31 UTC (rev 43017)
+++ trunk/mcs/class/Mono.Security/Mono.Security.Protocol.Tls/SslClientStream.cs 
2005-04-15 00:31:20 UTC (rev 43018)
@@ -51,6 +51,7 @@
                X509Certificate certificate, 
                string                  targetHost);
 
+       delegate int ReadDelegate (byte [] buffer, int offset, int count);
        #endregion
 
        public class SslClientStream : Stream, IDisposable
@@ -481,8 +482,8 @@
                                        }
 
                                        // return the record(s) to the caller
-                                       asyncResult = 
this.inputBuffer.BeginRead(
-                                               buffer, offset, count, 
callback, state);
+                                       ReadDelegate rd = new ReadDelegate 
(this.inputBuffer.Read);
+                                       asyncResult = rd.BeginInvoke (buffer, 
offset, count, callback, state);
                                }
                                catch (TlsException ex)
                                {

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

Reply via email to