[ovs-dev] [PATCH] ofproto: Store time since last connect and disconnect in Controller table.

Ben Pfaff blp at nicira.com
Mon Mar 14 19:30:40 UTC 2011


On Mon, Mar 14, 2011 at 12:26:25PM -0700, Andrew Evans wrote:
> On Mar 14, 2011, at 10:33 AM, Ben Pfaff wrote:
> > In the two instances of expressions like
> > 	xasprintf("%ld", time_now() - rconn_get_last_connection(rconn))
> > I would advise adding a cast to "long int" since there is no guarantee
> > that time_t is compatible with long int.  It is probably int or long
> > int, but it might be long long int or even short, and it's better not
> > to guess.
> 
> Good point. Just curious: what is the reason for using "long int"
> rather than just "long"?

They're the same, so either one is fine with me.  I was just being
extra-clear in my description.

> > As with the other patch I'm surprised to see an empty value in place
> > of an omitted key-value pair.
> 
> Ok, I've changed that. Now those keys are set only if they have valid values.

OK, I guess this means that you liked that suggestion.  Regardless of
which way you go, I'd want to do the same with both Controller and
Manager here.

The diff looks fine to me.  Thank you.




More information about the dev mailing list