Hello,

I noticed a large error in click-classifier.cc, both for ns-2.26 and ns-2.29. 
In the method void ClickClassifier::LinkLayerFailed(Packet* p) there is a new 
of the data array with new ... len[len] and it is deleted in the same method 
with a plain delete. This gave me a floating point error and of course it can 
be corrected with the patch below.

--- ns-2.29-patch.orig  2006-07-05 16:47:47.000000000 +0200
+++ ns-2.29-patch       2006-07-05 16:48:04.000000000 +0200
@@ -636,7 +636,7 @@
 +    simstate.curtime = GetSimTime();
 +    //fprintf(stderr,"Sending packet up to click...\n");
 +    
simclick_click_send(clickinst_,&simstate,ifid,clicktype,data,len,&simpinfo);
-+    delete data;
++    delete[] data;
 +    data = 0;
 +  }
 +  else {

Regards,
Bart
-- 
Bart Braem
PATS research group
Dept. of Mathematics and Computer Sciences
University of Antwerp
G2.36, Building G
Middelheimlaan 1
2020 Antwerpen, Belgium
Phone: +32 (0)3 265.35.19.
Fax: +32 (0)3 265.37.77.
Web: www.pats.ua.ac.be

Attachment: pgpjHfoV82EBf.pgp
Description: PGP signature

_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to