Author: toad
Date: 2008-03-01 02:00:37 +0000 (Sat, 01 Mar 2008)
New Revision: 18280

Modified:
   trunk/freenet/src/freenet/node/NodeDispatcher.java
Log:
Accept a LocChangeNotification even when we don't have a location yet. 
(DUHHHH!!)

Modified: trunk/freenet/src/freenet/node/NodeDispatcher.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeDispatcher.java  2008-03-01 02:00:03 UTC 
(rev 18279)
+++ trunk/freenet/src/freenet/node/NodeDispatcher.java  2008-03-01 02:00:37 UTC 
(rev 18280)
@@ -121,16 +121,16 @@
                        }
                        // We claim it in any case
                        return true;
+               } else if(source.isRealConnection() && spec == 
DMT.FNPLocChangeNotification) {
+                       double newLoc = m.getDouble(DMT.LOCATION);
+                       source.updateLocation(newLoc);
+                       return true;
                }
-
+               
                if(!source.isRoutable()) return false;
                if(Logger.shouldLog(Logger.DEBUG, this)) Logger.debug(this, 
"Not routable");

-               if(spec == DMT.FNPLocChangeNotification) {
-                       double newLoc = m.getDouble(DMT.LOCATION);
-                       source.updateLocation(newLoc);
-                       return true;
-               } else if(spec == DMT.FNPNetworkID) {
+               if(spec == DMT.FNPNetworkID) {
                        source.handleFNPNetworkID(m);
                        return true;
                } else if(spec == DMT.FNPSwapRequest) {


Reply via email to