On Fri, Jul 18, 2014 at 01:49:52PM -0700, Alex Wang wrote:
> This commit adds more logging points in stp module for debugging.
> Also, it makes the log print out the port name.
> 
> Signed-off-by: Alex Wang <al...@nicira.com>

This is not safe against simultaneous calls for the same port, but it
would be if the assignment to 'old' happened with the lock held:
> +void
> +stp_port_set_name(struct stp_port *p, const char *name)
> +{
> +    char *old = p->port_name;
> +
> +    ovs_mutex_lock(&mutex);
> +    p->port_name = xstrdup(name);
> +    free(old);
> +    ovs_mutex_unlock(&mutex);
> +}

Acked-by: Ben Pfaff <b...@nicira.com>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to