summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2007-03-08 22:13:32 +0000
committerTom Tromey <tromey@redhat.com>2007-03-08 22:13:32 +0000
commitd7e17c07949dac8070ffb7d74f4bdee1ab2b42f6 (patch)
treeaf55bcba77fa4d9797823cd1c3bbf3a6350faeec /java
parent9a839d5be89125ca6e4edee0b4e9c171b49db0e7 (diff)
downloadclasspath-d7e17c07949dac8070ffb7d74f4bdee1ab2b42f6.tar.gz
PR libgcj/31093:
* java/net/MulticastSocket.java (setTimeToLive): Allow ttl==0.
Diffstat (limited to 'java')
-rw-r--r--java/net/MulticastSocket.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/net/MulticastSocket.java b/java/net/MulticastSocket.java
index 2841192db..114d11f2d 100644
--- a/java/net/MulticastSocket.java
+++ b/java/net/MulticastSocket.java
@@ -1,5 +1,5 @@
/* MulticastSocket.java -- Class for using multicast sockets
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2007
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -337,7 +337,7 @@ public class MulticastSocket extends DatagramSocket
/**
* Sets the "Time to Live" value for a socket. The value must be between
- * 1 and 255.
+ * 0 and 255, inclusive.
*
* @param ttl The new TTL value
*
@@ -350,7 +350,7 @@ public class MulticastSocket extends DatagramSocket
if (isClosed())
throw new SocketException("socket is closed");
- if (ttl <= 0 || ttl > 255)
+ if (ttl < 0 || ttl > 255)
throw new IllegalArgumentException("Invalid ttl: " + ttl);
getImpl().setTimeToLive(ttl);