Patch: java.net.DatagramSocketImpl

Warren Levy warrenl@cygnus.com
Tue Jan 4 14:37:00 GMT 2000


Folks,
I'm committing the following minor change to java.net.  Naturally, if 
anyone sees a problem (or areas of further concern, please followup).

Thanks go to Anthony Green for finding this one.
--warrenl


2000-01-04  Warren Levy  <warrenl@cygnus.com>

        * java/net/natPlainDatagramSocketImpl.cc (peek): Removed unnecesary
        comment.
        (receive): Set the sender's address in the DatagramPacket.


Index: java/net/natPlainDatagramSocketImpl.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/net/natPlainDatagramSocketImpl.cc,v
retrieving revision 1.15
diff -u -p -r1.15 natPlainDatagramSocketImpl.cc
--- natPlainDatagramSocketImpl.cc       1999/12/17 05:11:28     1.15
+++ natPlainDatagramSocketImpl.cc       2000/01/04 22:34:49
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999  Cygnus Solutions
+/* Copyright (C) 1999, 2000  Cygnus Solutions
 
    This file is part of libgcj.
 
@@ -242,7 +242,6 @@ java::net::PlainDatagramSocketImpl::peek
 #endif
   else
     goto error;
-  // FIXME: Multicast:  s->address = new InetAddress (raddr, NULL);
   i->address = raddr;
   return rport;
  error:
@@ -335,7 +334,7 @@ java::net::PlainDatagramSocketImpl::rece
 #endif
   else
     goto error;
-  // FIXME: Multicast:  s->address = new InetAddress (raddr, NULL);
+  p->setAddress (new InetAddress (raddr, NULL));
   p->setPort (rport);
   p->setLength ((jint) retlen);
   return;






More information about the Java-patches mailing list