Imported Upstream version 5.8.0.108
Former-commit-id: aa718e56e7949f19a33e4f0baefe3d1ea1dea22c
This commit is contained in:
parent
5fb0d61fc6
commit
88ff76fe28
@ -1 +1 @@
|
||||
500f87548b7d7fc19932796f10f77b860532830c
|
||||
3f09b601878b3b0733df5bf60b63d9f073a2ddd9
|
@ -1 +1 @@
|
||||
c37b093c9632205f4c8961496754329b55b87cc6
|
||||
5c436fa207f4194311d1484a2af27b92af78515a
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "5.8.0.103";
|
||||
public const string MonoVersion = "5.8.0.108";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -249,12 +249,22 @@ namespace System.Net.Sockets
|
||||
|
||||
internal void FinishConnectByNameSyncFailure (Exception exception, int bytesTransferred, SocketFlags flags)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
SetResults (exception, bytesTransferred, flags);
|
||||
|
||||
if (current_socket != null)
|
||||
current_socket.is_connected = false;
|
||||
|
||||
Complete ();
|
||||
}
|
||||
|
||||
internal void FinishOperationAsyncFailure (Exception exception, int bytesTransferred, SocketFlags flags)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
SetResults (exception, bytesTransferred, flags);
|
||||
|
||||
if (current_socket != null)
|
||||
current_socket.is_connected = false;
|
||||
|
||||
Complete ();
|
||||
}
|
||||
|
||||
internal void FinishWrapperConnectSuccess (Socket connectSocket, int bytesTransferred, SocketFlags flags)
|
||||
@ -268,8 +278,29 @@ namespace System.Net.Sockets
|
||||
internal void SetResults (SocketError socketError, int bytesTransferred, SocketFlags flags)
|
||||
{
|
||||
SocketError = socketError;
|
||||
ConnectByNameError = null;
|
||||
BytesTransferred = bytesTransferred;
|
||||
SocketFlags = flags;
|
||||
}
|
||||
|
||||
internal void SetResults (Exception exception, int bytesTransferred, SocketFlags flags)
|
||||
{
|
||||
ConnectByNameError = exception;
|
||||
BytesTransferred = bytesTransferred;
|
||||
SocketFlags = flags;
|
||||
|
||||
if (exception == null)
|
||||
{
|
||||
SocketError = SocketError.Success;
|
||||
}
|
||||
else
|
||||
{
|
||||
var socketException = exception as SocketException;
|
||||
if (socketException != null)
|
||||
SocketError = socketException.SocketErrorCode;
|
||||
else
|
||||
SocketError = SocketError.SocketError;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -901,13 +901,9 @@ namespace System.Net
|
||||
internal int EndRead (HttpWebRequest request, IAsyncResult result)
|
||||
{
|
||||
Stream s = null;
|
||||
Exception exception = null;
|
||||
|
||||
lock (this) {
|
||||
if (request.Aborted)
|
||||
throw new WebException ("Request aborted", WebExceptionStatus.RequestCanceled);
|
||||
if (Data.request != request)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
if (nstream == null)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
@ -915,19 +911,35 @@ namespace System.Net
|
||||
bool done = false;
|
||||
WebAsyncResult wr = null;
|
||||
IAsyncResult nsAsync = ((WebAsyncResult) result).InnerAsyncResult;
|
||||
if (chunkedRead && (nsAsync is WebAsyncResult)) {
|
||||
wr = (WebAsyncResult) nsAsync;
|
||||
IAsyncResult inner = wr.InnerAsyncResult;
|
||||
if (inner != null && !(inner is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (inner);
|
||||
try {
|
||||
if (chunkedRead && (nsAsync is WebAsyncResult)) {
|
||||
wr = (WebAsyncResult) nsAsync;
|
||||
IAsyncResult inner = wr.InnerAsyncResult;
|
||||
if (inner != null && !(inner is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (inner);
|
||||
done = nbytes == 0;
|
||||
}
|
||||
} else if (!(nsAsync is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (nsAsync);
|
||||
wr = (WebAsyncResult) result;
|
||||
done = nbytes == 0;
|
||||
}
|
||||
} else if (!(nsAsync is WebAsyncResult)) {
|
||||
nbytes = s.EndRead (nsAsync);
|
||||
wr = (WebAsyncResult) result;
|
||||
done = nbytes == 0;
|
||||
} catch (Exception exc) {
|
||||
exception = exc;
|
||||
}
|
||||
|
||||
lock (this) {
|
||||
if (request.Aborted)
|
||||
throw new WebException ("Request aborted", WebExceptionStatus.RequestCanceled);
|
||||
if (Data.request != request)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
if (nstream == null)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
}
|
||||
|
||||
if (exception != null)
|
||||
throw exception;
|
||||
|
||||
if (chunkedRead) {
|
||||
try {
|
||||
chunkStream.WriteAndReadBack (wr.Buffer, wr.Offset, wr.Size, ref nbytes);
|
||||
@ -1029,6 +1041,24 @@ namespace System.Net
|
||||
internal bool EndWrite (HttpWebRequest request, bool throwOnError, IAsyncResult result)
|
||||
{
|
||||
Stream s = null;
|
||||
WebExceptionStatus newStatus = status;
|
||||
bool complete;
|
||||
Exception exception = null;
|
||||
|
||||
lock (this) {
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
try {
|
||||
s.EndWrite (result);
|
||||
complete = true;
|
||||
} catch (Exception exc) {
|
||||
newStatus = WebExceptionStatus.SendFailure;
|
||||
if (throwOnError && exc.InnerException != null)
|
||||
exception = exc.InnerException;
|
||||
complete = false;
|
||||
}
|
||||
|
||||
lock (this) {
|
||||
if (status == WebExceptionStatus.RequestCanceled)
|
||||
return true;
|
||||
@ -1036,18 +1066,12 @@ namespace System.Net
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
if (nstream == null)
|
||||
throw new ObjectDisposedException (typeof (NetworkStream).FullName);
|
||||
s = nstream;
|
||||
}
|
||||
|
||||
try {
|
||||
s.EndWrite (result);
|
||||
return true;
|
||||
} catch (Exception exc) {
|
||||
status = WebExceptionStatus.SendFailure;
|
||||
if (throwOnError && exc.InnerException != null)
|
||||
throw exc.InnerException;
|
||||
return false;
|
||||
}
|
||||
status = newStatus;
|
||||
if (exception != null)
|
||||
throw exception;
|
||||
return complete;
|
||||
}
|
||||
|
||||
internal int Read (HttpWebRequest request, byte [] buffer, int offset, int size)
|
||||
@ -1132,7 +1156,6 @@ namespace System.Net
|
||||
try {
|
||||
nstream.Close ();
|
||||
} catch {}
|
||||
nstream = null;
|
||||
}
|
||||
|
||||
if (socket != null) {
|
||||
|
@ -1 +1 @@
|
||||
60a68c5ab5b1c095b8a1a23761f45ff75b1bf9db
|
||||
9753fe2a01b47a61fcf858b148ffa69499f413bb
|
@ -1 +1 @@
|
||||
4d9a8c11d37509f6374d96c87a8faabbd90eded0
|
||||
f69c8868f2606fc0112f30eaa287cf18da4a26eb
|
@ -1 +1 @@
|
||||
c2e760a7bb7d670d2858a4a763c68a6a144fe3d5
|
||||
da9c8e6d2dc761d4a7b58c941cae838334c936b0
|
@ -1 +1 @@
|
||||
5faa2a5296ce8e5717873b82b8cc94f7f4a0bf77
|
||||
f7a3d40197da007b65d00a3838880b0e93ad446e
|
@ -1 +1 @@
|
||||
db80c37286faf91a62bd4868e0a57bbff4bbf5dd
|
||||
96f658d24a4c74352185a04ca4fc0b7c4db159c5
|
@ -1 +1 @@
|
||||
3674314ec608873638973618f84c0c09564439ef
|
||||
d799b0595e090cc5038305e06e8f0a6a0738170d
|
@ -1 +1 @@
|
||||
ff2d583abecb15a4159513f02909e9644b50845a
|
||||
67b8da2abab1db07ce6cda1b9301b2d1ceecfe8d
|
@ -1 +1 @@
|
||||
97d5ef8a4d495313de00e7f5affb9eec789f33f8
|
||||
bb723a17df2c15cb5cc050b53b42ec90ee3871c8
|
@ -1 +1 @@
|
||||
44d62229b5c4ec1cc50052f9edac17abc069be87
|
||||
70b5308cc1e2048e1d51e5405027f3b16c33af42
|
@ -1 +1 @@
|
||||
3231f9c9fb037e65dc5b487d8e045e6839fdb40c
|
||||
372afc44250bcb44e95bb107ac56a683cf875fee
|
@ -1 +1 @@
|
||||
c699d7350bbed35bd074ad7ec966882d4a8222a5
|
||||
f90c9b2987aa1cdb7c2f207263835a0f1021e8ee
|
@ -1 +1 @@
|
||||
fe41a9a3652738c39a0c71f9799ddb76564dacca
|
||||
3622224821062d80bfa27d4482a1b29ade3869df
|
@ -1 +1 @@
|
||||
1d4d16c4202a3dd4e1bd6aaafbf074847bedebc5
|
||||
72785d68c86916ee09aee3f2f914c05d20402a99
|
@ -1 +1 @@
|
||||
0584e6f11a61379d04a37167d0cad693af971a1b
|
||||
475f042dea75386f42540fb89cf29eb8ad9581c7
|
@ -1 +1 @@
|
||||
37b5f7e483f84610a3d92bf44c08795ec777f872
|
||||
74996d0d8a8d8a4fd4c4a2a5f9778855f6b26e8a
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user