Author: toad
Date: 2007-06-25 20:44:20 +0000 (Mon, 25 Jun 2007)
New Revision: 13754

Modified:
   trunk/freenet/src/freenet/node/TextModeClientInterface.java
Log:
Dump probes to socket not error output

Modified: trunk/freenet/src/freenet/node/TextModeClientInterface.java
===================================================================
--- trunk/freenet/src/freenet/node/TextModeClientInterface.java 2007-06-25 
20:32:39 UTC (rev 13753)
+++ trunk/freenet/src/freenet/node/TextModeClientInterface.java 2007-06-25 
20:44:20 UTC (rev 13754)
@@ -832,10 +832,16 @@
                                }

                                public void onTrace(long uid, double target, 
double nearest, double best, short htl, short counter, double location, long 
nodeUID, double[] peerLocs, long[] peerUIDs, double[] locsNotVisited, short 
forkCount) {
-                                       String msg = "Probe trace: UID="+uid+" 
target="+target+" nearest="+nearest+" best="+best+" htl="+htl+" 
counter="+counter+" location="+location+"node UID="+nodeUID+" peer 
locs="+StringArray.toString(peerLocs)+" peer 
UIDs="+StringArray.toString(peerUIDs)+" locs not visited = 
"+StringArray.toString(locsNotVisited)+" forks: "+forkCount;
-                                       System.err.println(msg);
+                                       String msg = "Probe trace: UID="+uid+" 
target="+target+" nearest="+nearest+" best="+best+" htl="+htl+" 
counter="+counter+" location="+location+"node UID="+nodeUID+" peer 
locs="+StringArray.toString(peerLocs)+" peer 
UIDs="+StringArray.toString(peerUIDs)+" locs not visited = 
"+StringArray.toString(locsNotVisited)+" forks: "+forkCount+'\n';
+                                       try {
+                                               
out.write(msg.toString().getBytes());
+                                               out.flush();
+                                       } catch (IOException e) {
+                                               // Ignore
+                                       }
                                }
                };
+               System.err.println("Probing keyspace around "+d+" ...");
                n.dispatcher.startProbe(d, cb);
                synchronized(this) {
                        while(!doneSomething) {


Reply via email to