From e0dd38f6722e891cfc91c8d795604b7b78c0bc81 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 12 Mar 2012 10:07:04 -0700 Subject: Rename the stream extension method WebUtil.CopyTo() to WebUtil.CopyStream(). .NET 4.0 added the method Stream.CopyTo(stream, bufferSize). For .NET 3.5 and before, WebUtil defined an extension method for Stream with the signature Stream.CopyTo(stream, maxBytesToCopy). The meaning of the second parameter is different in the two forms and depending on which compiler and/or runtime you use, you could get one form or the other. Crashes ensue. This change renames the WebUtil stream copy method to something that cannot be confused with the new CopyTo method defined in .NET 4.0. --- OpenSim/Data/MySQL/MySQLXAssetData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs index 95ef72a..06fe55a 100644 --- a/OpenSim/Data/MySQL/MySQLXAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs @@ -162,7 +162,7 @@ namespace OpenSim.Data.MySQL using (GZipStream decompressionStream = new GZipStream(new MemoryStream(asset.Data), CompressionMode.Decompress)) { MemoryStream outputStream = new MemoryStream(); - WebUtil.CopyTo(decompressionStream, outputStream, int.MaxValue); + WebUtil.CopyStream(decompressionStream, outputStream, int.MaxValue); // int compressedLength = asset.Data.Length; asset.Data = outputStream.ToArray(); -- cgit v1.1