X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fofproto.c;h=ebdbc682f11296ff76d032f15dac8a3b21781530;hb=81e2083fe6b7c16055f01c4b1e40f25867594bf6;hp=8b8b28dd13ee17a774a6eec47012d1baeb7727af;hpb=53d046612df6c88ad8b02c8e99bbfb6e45fe2326;p=sliver-openvswitch.git diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 8b8b28dd1..ebdbc682f 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -57,7 +57,6 @@ #include "shash.h" #include "sset.h" #include "stream-ssl.h" -#include "svec.h" #include "tag.h" #include "timer.h" #include "timeval.h" @@ -544,7 +543,7 @@ ofproto_set_desc(struct ofproto *p, } int -ofproto_set_snoops(struct ofproto *ofproto, const struct svec *snoops) +ofproto_set_snoops(struct ofproto *ofproto, const struct sset *snoops) { return connmgr_set_snoops(ofproto->connmgr, snoops); } @@ -553,7 +552,7 @@ int ofproto_set_netflow(struct ofproto *ofproto, const struct netflow_options *nf_options) { - if (nf_options && nf_options->collectors.n) { + if (nf_options && !sset_is_empty(&nf_options->collectors)) { if (!ofproto->netflow) { ofproto->netflow = netflow_create(); } @@ -668,8 +667,14 @@ ofproto_get_fail_mode(const struct ofproto *p) return connmgr_get_fail_mode(p->connmgr); } +bool +ofproto_has_snoops(const struct ofproto *ofproto) +{ + return connmgr_has_snoops(ofproto->connmgr); +} + void -ofproto_get_snoops(const struct ofproto *ofproto, struct svec *snoops) +ofproto_get_snoops(const struct ofproto *ofproto, struct sset *snoops) { connmgr_get_snoops(ofproto->connmgr, snoops); }