[Click] [PATCH] SR element compile error

Eddie Kohler kohler at cs.ucla.edu
Sun Sep 7 00:35:44 EDT 2008


Thanks for the patch -- applied!

Eddie


Roberto Riggio wrote:
> Due to the recent changes to timestamp some roofnet elements 
> do not compile anymore. I'm attaching a patch.
> 
> --
> 
> diff --git a/roofnet/sr/ettstat.cc b/roofnet/sr/ettstat.cc
> index 5717c42..9003003 100644
> --- a/roofnet/sr/ettstat.cc
> +++ b/roofnet/sr/ettstat.cc
> @@ -546,7 +546,7 @@ ETTStat::simple_action(Packet *p)
>  
>    /* keep stats for at least the averaging period */
>    while ((unsigned) l->_probes.size() &&
> -	 now._sec - l->_probes[0]._when._sec > (signed) (1 + (l->_tau / 1000)))
> +	 now.sec() - l->_probes[0]._when.sec() > (signed) (1 + (l->_tau / 1000)))
>      l->_probes.pop_front();
>    
>  
> @@ -639,7 +639,7 @@ ETTStat::simple_action(Packet *p)
>      int seq = entry->_seq;
>      if (neighbor == ip && 
>  	((uint32_t) neighbor > (uint32_t) _ip)) {
> -      seq = now._sec;
> +      seq = now.sec();
>      }
>      update_link(ip, neighbor, rates, fwd, rev, seq);
>      ptr += num_rates * sizeof(struct link_info);
> @@ -771,10 +771,10 @@ ETTStat::clear_stale()
>      IPAddress n = _neighbors[x];
>      probe_list_t *l = _bcast_stats.findp(n);
>      if (!l || 
> -	(unsigned) now._sec - l->_last_rx._sec > 2 * l->_tau/1000) {
> +	(unsigned) now.sec() - l->_last_rx.sec() > 2 * l->_tau/1000) {
>        click_chatter("%{element} clearing stale neighbor %s age %d\n ",
>  		    this, n.unparse().c_str(),
> -		    now._sec - l->_last_rx._sec);
> +		    now.sec() - l->_last_rx.sec());
>        _bcast_stats.remove(n);
>      } else {
>        new_neighbors.push_back(n);
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list