[freenet-cvs] r15016 - trunk/plugins/UPnP

toad at freenetproject.org toad at freenetproject.org
Fri Sep 7 20:14:06 UTC 2007


Author: toad
Date: 2007-09-07 20:14:06 +0000 (Fri, 07 Sep 2007)
New Revision: 15016

Modified:
   trunk/plugins/UPnP/UPnP.java
Log:
log to stderr for easy debugging, for now

Modified: trunk/plugins/UPnP/UPnP.java
===================================================================
--- trunk/plugins/UPnP/UPnP.java	2007-09-07 20:10:27 UTC (rev 15015)
+++ trunk/plugins/UPnP/UPnP.java	2007-09-07 20:14:06 UTC (rev 15016)
@@ -185,6 +185,7 @@
 	
 	public boolean tryAddMapping(String protocol, int port, String description, ForwardPort fp) {
 		Logger.normal(this, "Registering a port mapping for " + port + "/" + protocol);
+		System.err.println("UPnP: Registering a port mapping for " + port + "/" + protocol);
 		int nbOfTries = 0;
 		while(nbOfTries++ < 5) {
 			isPortForwarded = addMapping("UDP", port, "Freenet 0.7 FNP - " + _router.getInterfaceAddress(), fp);
@@ -195,6 +196,7 @@
 			} catch (InterruptedException e) {}
 		}
 		Logger.normal(this, (isPortForwarded ? "Mapping is successful!" : "Mapping has failed!") + " ("+ nbOfTries + " tries)");
+		System.err.println("UPnP: "+(isPortForwarded ? "Mapping is successful!" : "Mapping has failed!") + " ("+ nbOfTries + " tries)");
 		return isPortForwarded;
 	}
 	
@@ -432,6 +434,8 @@
 		synchronized(this) {
 			portsForwarded.remove(fp);
 		}
+		
+		System.err.println("UPnP: Removed mapping for "+port+" protocol "+protocol);
 		return retval;
 	}
 




More information about the cvs mailing list