[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Deluge/delugetools Pinger.java, 1.7, 1.8

Jonathan Hui jwhui at users.sourceforge.net
Tue Jun 14 13:55:37 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/delugetools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7769

Modified Files:
	Pinger.java 
Log Message:
Fixed a race condition that could cause a ping request to never
complete. Ping messages may not come back in order and requests for an
image should not be made until the java app is ready to service them.



Index: Pinger.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/delugetools/Pinger.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Pinger.java	14 Jun 2005 06:06:44 -0000	1.7
--- Pinger.java	14 Jun 2005 20:55:35 -0000	1.8
***************
*** 260,269 ****
        if (pingReplies.get(new Integer(imgNum)) == null) {
  	pingReplies.put(new Integer(imgNum), pingReply);
  	if (pingReply.get_imgDesc_numPgsComplete() == 0) {
  	  setupNewImage();
  	  return;
  	}
!       }
!       if (curImage == imgNum) {
  	DelugeReqMsg reqMsg = new DelugeReqMsg();
  	reqMsg.set_sourceAddr(pcAddr);
--- 260,270 ----
        if (pingReplies.get(new Integer(imgNum)) == null) {
  	pingReplies.put(new Integer(imgNum), pingReply);
+       }
+       if (curImage == imgNum) {
  	if (pingReply.get_imgDesc_numPgsComplete() == 0) {
  	  setupNewImage();
  	  return;
  	}
! 
  	DelugeReqMsg reqMsg = new DelugeReqMsg();
  	reqMsg.set_sourceAddr(pcAddr);



More information about the Tinyos-beta-commits mailing list