Author: kostat
Date: 2006-01-09 10:59:31 -0500 (Mon, 09 Jan 2006)
New Revision: 55233
Modified:
trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
trunk/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.jvm.cs
Log:
merging HttpSessionState.cs@@/main/19-24
Modified: trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
2006-01-09 15:55:45 UTC (rev 55232)
+++ trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
2006-01-09 15:59:31 UTC (rev 55233)
@@ -1,3 +1,7 @@
+2006-01-09 Konstantin Triger <[EMAIL PROTECTED]>
+
+ * HttpSessionState.jvm.cs: merging HttpSessionState.cs@@/main/19-24
+
2005-11-28 Chris Toshok <[EMAIL PROTECTED]>
* SessionStateModule.cs: CONFIGURATION_2_0 work.
Modified:
trunk/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.jvm.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.jvm.cs
2006-01-09 15:55:45 UTC (rev 55232)
+++ trunk/mcs/class/System.Web/System.Web.SessionState/HttpSessionState.jvm.cs
2006-01-09 15:59:31 UTC (rev 55233)
@@ -57,6 +57,7 @@
private object _app;
private bool _readFirstTime = true;
private bool _needSessionPersistence = false;
+ private const bool HAS_CONTENT_TO_SERIALIZE = true;
internal HttpSessionState (string id,
SessionDictionary dict,
@@ -112,9 +113,13 @@
output.writeBoolean(_needSessionPersistence);
if (!_needSessionPersistence)
{
+ //indicates that there is nothing to serialize
for this object
+ output.writeBoolean(!HAS_CONTENT_TO_SERIALIZE);
return;
}
- System.IO.MemoryStream ms = new
System.IO.MemoryStream();
+ //indicates that there is a content for serialization
+ output.writeBoolean(HAS_CONTENT_TO_SERIALIZE);
+ System.Web.J2EE.ObjectOutputStream ms = new
System.Web.J2EE.ObjectOutputStream(output);
System.IO.BinaryWriter bw = new
System.IO.BinaryWriter(ms);
bw.Write(_id);
_dict.Serialize(bw);
@@ -131,7 +136,6 @@
else
bw.Write(3);
bw.Write(_isReadonly);
-
output.writeObject(vmw.common.TypeUtils.ToSByteArray(ms.GetBuffer()));
}
}
@@ -139,18 +143,15 @@
{
lock(this)
{
- _needSessionPersistence = input.readBoolean();
- if (!_needSessionPersistence)
- {
+ if(input.readBoolean() != HAS_CONTENT_TO_SERIALIZE)
//noting has been written
return;
- }
- sbyte[] array = (sbyte[])input.readObject();
- if (!_readFirstTime || array == null || array.Length ==
0)
- {
+
+ if (!_readFirstTime) {
return;
}
+
_readFirstTime = false;
- System.IO.MemoryStream ms = new
System.IO.MemoryStream((byte[])vmw.common.TypeUtils.ToByteArray(array));
+ System.Web.J2EE.ObjectInputStream ms = new
System.Web.J2EE.ObjectInputStream( input );
System.IO.BinaryReader br = new
System.IO.BinaryReader(ms);
_id = br.ReadString();
_dict = SessionDictionary.Deserialize(br);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches