diff options
author | Robert Adams | 2012-03-12 10:07:04 -0700 |
---|---|---|
committer | Robert Adams | 2012-03-12 10:07:04 -0700 |
commit | e0dd38f6722e891cfc91c8d795604b7b78c0bc81 (patch) | |
tree | 9e2b7f094df639c32ca0157944e78431c6982349 /OpenSim/Services/Connectors | |
parent | Change OpenSim.ini.example to reflect how to actually enable prim limits, (diff) | |
download | opensim-SC_OLD-e0dd38f6722e891cfc91c8d795604b7b78c0bc81.zip opensim-SC_OLD-e0dd38f6722e891cfc91c8d795604b7b78c0bc81.tar.gz opensim-SC_OLD-e0dd38f6722e891cfc91c8d795604b7b78c0bc81.tar.bz2 opensim-SC_OLD-e0dd38f6722e891cfc91c8d795604b7b78c0bc81.tar.xz |
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.
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 99523a1..6bfc5cc 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs | |||
@@ -477,7 +477,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
477 | // Grab the asset data from the response stream | 477 | // Grab the asset data from the response stream |
478 | using (MemoryStream stream = new MemoryStream()) | 478 | using (MemoryStream stream = new MemoryStream()) |
479 | { | 479 | { |
480 | responseStream.CopyTo(stream, 4096); | 480 | responseStream.CopyStream(stream, Int32.MaxValue); |
481 | asset.Data = stream.ToArray(); | 481 | asset.Data = stream.ToArray(); |
482 | } | 482 | } |
483 | } | 483 | } |