[Javanetsim-cvs] javaNetSim/core/protocolsuite/tcp_ip TCP_HashTableElement.java, 1.1, 1.2 Tcp.java,
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-09-07 14:08:58
|
Update of /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv23705/core/protocolsuite/tcp_ip Modified Files: TCP_HashTableElement.java Tcp.java Log Message: Index: Tcp.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/Tcp.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** Tcp.java 7 Sep 2006 14:02:09 -0000 1.70 --- Tcp.java 7 Sep 2006 14:08:54 -0000 1.71 *************** *** 168,176 **** public void TCPsetTimer(TCP_HashTableElement Elm, int inREP) { if(Elm.timer==null) { ! System.out.println("Sender timer init!"); Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP),TCP_CONNECT_TIME,TCP_CONNECT_TIME); } else { ! System.out.println("Sender Timer REinit due to new packet arrival!"); Elm.timer.cancel(); Elm.timer=null; --- 168,176 ---- public void TCPsetTimer(TCP_HashTableElement Elm, int inREP) { if(Elm.timer==null) { ! System.out.println("Sender timer init! Elm id = " + Elm.returnID()); Elm.timer=new Timer(); Elm.timer.schedule(new TCPTask(Elm,TCP_CONNECT_TIME,this, inREP),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; *************** *** 248,252 **** Elm.reset(); } else { //nothing to resend, but numRepeat>0 ! System.out.println("Timer cancel - part1! NumRepeat = " + numRepeat); try{ numRepeat = 0; --- 248,252 ---- Elm.reset(); } else { //nothing to resend, but numRepeat>0 ! System.out.println("Timer cancel - part1! NumRepeat = " + numRepeat + " Elm id = " + Elm.returnID()); try{ numRepeat = 0; *************** *** 260,264 **** Error.Report(e); } ! System.out.println("Timer cancel - part2!"); } } --- 260,264 ---- Error.Report(e); } ! System.out.println("Timer cancel - part2! Elm id = " + Elm.returnID()); } } Index: TCP_HashTableElement.java =================================================================== RCS file: /cvsroot/javanetsim/javaNetSim/core/protocolsuite/tcp_ip/TCP_HashTableElement.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TCP_HashTableElement.java 7 Sep 2006 14:02:09 -0000 1.1 --- TCP_HashTableElement.java 7 Sep 2006 14:08:54 -0000 1.2 *************** *** 109,112 **** --- 109,121 ---- * @version v0.20 */ + + public TCP_HashTableElement(){ + Element_id++; + } + + public int returnID(){ + return Element_id; + } + public void addstats(Tcp TCPStack) { TCPStack.IncReceivedDuplicatesNumber(this.received_duplicates); *************** *** 126,130 **** public void reset() { if (timer!=null){ ! System.out.println("Elm.reset: Timer cancel - part 1!"); try{ this.timer.cancel(); --- 135,139 ---- public void reset() { if (timer!=null){ ! System.out.println("Elm.reset: Timer cancel - part 1! Elm id = " + this.returnID()); try{ this.timer.cancel(); *************** *** 133,142 **** Error.Report(e); } ! System.out.println("Elm.reset: Timer cancel - part 2!"); this.timer = null; } if (Servertimer!=null){ ! System.out.println("Elm.reset: Servertimer cancel - part 1!"); try{ this.Servertimer.cancel(); --- 142,151 ---- Error.Report(e); } ! System.out.println("Elm.reset: Timer cancel - part 2! Elm id = " + this.returnID()); this.timer = null; } if (Servertimer!=null){ ! System.out.println("Elm.reset: Servertimer cancel - part 1! Elm id = " + this.returnID()); try{ this.Servertimer.cancel(); *************** *** 145,149 **** Error.Report(e); } ! System.out.println("Elm.reset: Servertimer cancel - part 2!"); this.Servertimer = null; } --- 154,158 ---- Error.Report(e); } ! System.out.println("Elm.reset: Servertimer cancel - part 2! Elm id = " + this.returnID()); this.Servertimer = null; } |