Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-06-05 18:08:42 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2004-06-05 18:08:42 +0400
commit552b3e2465fe6591629c3db72aa521d569295eca (patch)
treebb41dea05808b9ec943957cbbc81a07c2f7a9613 /mcs/class/System/System.Net.Sockets
parent708cf2a5323a9fa9fd6393f7cc22ed508a4d2272 (diff)
2004-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Socket.cs: throw ArgumentNullException if all the list are null OR empty. Fixes bug #59632. svn path=/trunk/mcs/; revision=28864
Diffstat (limited to 'mcs/class/System/System.Net.Sockets')
-rw-r--r--mcs/class/System/System.Net.Sockets/ChangeLog5
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket.cs11
2 files changed, 10 insertions, 6 deletions
diff --git a/mcs/class/System/System.Net.Sockets/ChangeLog b/mcs/class/System/System.Net.Sockets/ChangeLog
index 08373b44c9d..1f615c3c15d 100644
--- a/mcs/class/System/System.Net.Sockets/ChangeLog
+++ b/mcs/class/System/System.Net.Sockets/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Socket.cs: throw ArgumentNullException if all the list are null OR
+ empty. Fixes bug #59632.
+
2004-05-21 Patrik Torstensson <totte@hiddenpeaks.com>
* TcpListener.cs: Fixes a lot of the problems with remoting nunit tests.
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index bb93fcd57b2..b8f2d82e92e 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -334,12 +334,6 @@ namespace System.Net.Sockets
public static void Select(IList read_list, IList write_list,
IList err_list, int time_us) {
- if(read_list==null &&
- write_list==null &&
- err_list==null) {
- throw new ArgumentNullException();
- }
-
int read_count = 0, write_count = 0, err_count = 0;
Socket[] read_arr = null;
Socket[] write_arr = null;
@@ -363,6 +357,11 @@ namespace System.Net.Sockets
if (err_count != 0)
err_arr=new Socket[err_count];
+ if(read_count == 0 && write_count == 0 && err_count == 0) {
+ throw new ArgumentNullException ("read_list, write_list, err_list",
+ "All the lists are null or empty.");
+ }
+
int i;
if (read_count != 0) {