|
From: Jonathan L. <le...@us...> - 2006-12-05 19:01:35
|
Update of /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11686/src/edu/harvard/syrah/pyxida/nc Modified Files: NCManager.java Log Message: fixed proxyping Index: NCManager.java =================================================================== RCS file: /cvsroot/pyxida/Pyxida/src/edu/harvard/syrah/pyxida/nc/NCManager.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** NCManager.java 5 Dec 2006 15:47:56 -0000 1.22 --- NCManager.java 5 Dec 2006 19:01:29 -0000 1.23 *************** *** 282,291 **** final CB1<Boolean> cbHandled) { - CBResult result = null; if (errorMessage != null) { ! log.debug(handler + " :" + errorMessage); ! result = CBResult.ERROR(errorMessage); ! } else { ! result = CBResult.OK(); } --- 282,287 ---- final CB1<Boolean> cbHandled) { if (errorMessage != null) { ! log.warn(handler + " :" + errorMessage); } *************** *** 301,305 **** } }); ! cbHandled.call(result, true); } } --- 297,301 ---- } }); ! cbHandled.call(CBResult.OK(), true); } } *************** *** 360,364 **** sendResponseMessage ("Ping", remoteAddr, ! new PingResponseMsg(0), msg.getMsgId(), "Ping to "+msg.target+" failed", cbHandled); break; --- 356,360 ---- sendResponseMessage ("Ping", remoteAddr, ! new ProxyPingResponseMsg(null, 0, 0, 0), msg.getMsgId(), "Ping to "+msg.target+" failed", cbHandled); break; *************** *** 627,638 **** switch (result.state) { case OK: { ! log.debug("proxyping response from "+neighbor+ ! " lat to "+addr+" "+responseMsg.latency); ! long curr_time = System.currentTimeMillis(); ! nc.processSample(neighbor, responseMsg.remoteCoordinate, ! responseMsg.remoteError, responseMsg.latency, ! responseMsg.remoteAge, ! curr_time, true); ! log.debug("update: "+nc); addUpNeighbor(neighbor); break; --- 623,638 ---- switch (result.state) { case OK: { ! if (responseMsg.remoteCoordinate != null) { ! log.debug("proxyping response from "+neighbor+ ! " lat to "+addr+" "+responseMsg.latency); ! long curr_time = System.currentTimeMillis(); ! nc.processSample(neighbor, responseMsg.remoteCoordinate, ! responseMsg.remoteError, responseMsg.latency, ! responseMsg.remoteAge, ! curr_time, true); ! log.debug("update: "+nc); ! } else { ! log.debug("proxyping from "+neighbor+" to "+addr+" failed"); ! } addUpNeighbor(neighbor); break; |