Просмотр исходного кода

2009-05-29 Atsushi Enomoto <[email protected]>

	* TcpDuplexSessionChannel.cs : looks like I have added some bogus
	  code. Handle preamble ack on ReadSizedMessage() only at server.
	  Consume EndRecord from server, at client side. Though it is likely
	  changed as it's blocking when mono is at server side.


svn path=/trunk/mcs/; revision=135044
Atsushi Eno 16 лет назад
Родитель
Сommit
5d79d1dc91

+ 7 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog

@@ -1,3 +1,10 @@
+2009-05-29  Atsushi Enomoto  <[email protected]>
+
+	* TcpDuplexSessionChannel.cs : looks like I have added some bogus
+	  code. Handle preamble ack on ReadSizedMessage() only at server.
+	  Consume EndRecord from server, at client side. Though it is likely
+	  changed as it's blocking when mono is at server side.
+
 2009-05-29  Atsushi Enomoto  <[email protected]>
 
 	* TcpDuplexSessionChannel.cs : .NET seems to be based on somewhat

+ 7 - 6
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TcpDuplexSessionChannel.cs

@@ -449,9 +449,10 @@ namespace System.ServiceModel.Channels
 		public Message ReadSizedMessage ()
 		{
 			// FIXME: implement full [MC-NMF].
-
-			ProcessPreambleRecipient ();
-			ProcessPreambleAckRecipient ();
+			if (is_service_side) {
+				ProcessPreambleRecipient ();
+				ProcessPreambleAckRecipient ();
+			}
 
 			var packetType = s.ReadByte ();
 			if (packetType != SizedEnvelopeRecord)
@@ -485,9 +486,9 @@ namespace System.ServiceModel.Channels
 			if (benc != null)
 				benc.CurrentReaderSession = null;
 
-//			if (s.Read (eof_buffer, 0, 1) == 1)
-//				if (eof_buffer [0] != EndRecord)
-//					throw new ProtocolException (String.Format ("Expected EndRecord message, got {0:X02}", eof_buffer [0]));
+			if (s.Read (eof_buffer, 0, 1) == 1)
+				if (eof_buffer [0] != EndRecord)
+					throw new ProtocolException (String.Format ("Expected EndRecord message, got {0:X02}", eof_buffer [0]));
 
 			return msg;
 		}