Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20604/core/protocolsuite/tcp_ip
Modified Files:
Tcp.java
Log Message:
Index: Tcp.java
===================================================================
RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** Tcp.java 7 Sep 2006 15:13:55 -0000 1.74
--- Tcp.java 7 Sep 2006 15:20:44 -0000 1.75
***************
*** 169,185 ****
*/
public void TCPsetTimer(TCP_HashTableElement Elm, int inREP) {
if(Elm.timer==null) {
System.out.println("##################################### ############ Sender timer init! Elm id = " + Elm.returnID() + " ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort);
Elm.timer=new Timer();
! Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP, timerid++),TCP_CONNECT_TIME,TCP_CONNECT_TIME);
} else {
! System.out.println("Sender Timer REinit due to new packet arrival! Elm id = " + Elm.returnID());
Elm.timer.cancel();
Elm.timer=null;
Elm.timer=new Timer();
! Elm.timer.schedule(new TCPTask(Elm,TCP_SENDER_TIME,this, inREP, timerid++), TCP_SENDER_TIME, TCP_SENDER_TIME);
System.out.println("##################################### ############ Sender Timer REinit DONE! ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort);
}
!
}
--- 169,188 ----
*/
public void TCPsetTimer(TCP_HashTableElement Elm, int inREP) {
+ try{
if(Elm.timer==null) {
System.out.println("##################################### ############ Sender timer init! Elm id = " + Elm.returnID() + " ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort);
Elm.timer=new Timer();
! Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP, ++timerid),TCP_CONNECT_TIME,TCP_CONNECT_TIME);
} else {
! System.out.println("##################################### ############ Sender Timer REinit due to new packet arrival! Elm id = " + Elm.returnID() + " && OLDID = " + timerid + "");
Elm.timer.cancel();
Elm.timer=null;
Elm.timer=new Timer();
! Elm.timer.schedule(new TCPTask(Elm,TCP_SENDER_TIME,this, inREP, ++timerid), TCP_SENDER_TIME, TCP_SENDER_TIME);
System.out.println("##################################### ############ Sender Timer REinit DONE! ID = " + timerid + " Elm connected to port:" + Elm.connectedtoPort);
}
! }catch(Exception e){
! Error.Report(e);
! }
}
|