Update of /cvsroot/freenet/freenet/src/freenet
In directory sc8-pr-cvs1:/tmp/cvs-serv13309

Modified Files:
        ConnectionHandler.java 
Log Message:
ConnectionHandler.java
(getLocalPort) return -1 if conn was null, -2 if conn.getSocket() threw
  IOException, and -3 if conn.getSocket() returned null.
  Then we can tell which of these is happening sometimes.


Index: ConnectionHandler.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/ConnectionHandler.java,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- ConnectionHandler.java      4 Oct 2003 01:16:55 -0000       1.164
+++ ConnectionHandler.java      4 Oct 2003 03:34:27 -0000       1.165
@@ -411,13 +411,13 @@
        public int getLocalPort() {
                tcpConnection c = conn;
                java.net.Socket sock;
-               if (c == null) return 0;
+               if (c == null) return -1;
                try {
                        sock = conn.getSocket();
                } catch (IOException e) { 
-                       sock = null; 
+                       return -2;
                }
-               if(sock == null) return 0;
+               if(sock == null) return -3;
                return sock.getLocalPort();
        }
 

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to