[Ns-developers] Bug report in ns-2.33/tcl/lib/ns-link.tcl

Tom Henderson tomh at tomh.org
Fri Dec 19 13:16:05 PST 2008


Pascal ANELLI wrote:
> Hello
> 
> in function insert-linkloss
> 
> This function doesn't work because LinkDelay::recv make a callback (at 
> the end of txt) to QueueHandler::handle  and this last one calls 
> queue_.resume();
> 
> an errormoduel doesn't do that.  It is the reason why this function 
> doesn't work.
> 
> I propose to add the errmodule after the link_ object. This becomes:
> 
> @@ -563,7 +563,7 @@
>  # in the queue
>  #
>  SimpleLink instproc insert-linkloss args {
> -       $self instvar link_errmodule_ queue_ drophead_ deqT_
> +       $self instvar link_errmodule_ queue_ drophead_ link_
>         if { $args == "" } {
>                 return $link_errmodule_
>         }
> @@ -574,13 +574,8 @@
>         }
>         set link_errmodule_ $em
> 
> -        if [info exists deqT_] {
> -                $em target [$deqT_ target]
> -                $deqT_ target $em
> -        } else {
> -                $em target [$queue_ target]
> -                $queue_ target $em
> -        }
> +        $em target [$link_ target]
> +        $link_ target $em
> 
>         $em drop-target $drophead_
>  }
> 
> 
> 
> Thank you sincerely
> 
> P ANELLI
> 
> 

Pascal,
I added the above (and your other suggested patch) to the ns-2 tracker. 
  Feel free to log other bug fixes there, in the future.

http://sourceforge.net/tracker/?group_id=149743

- Tom


More information about the Ns-developers mailing list