X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fconnmgr.c;h=44e1b28467908a7b62e12904ed8752a9e992360d;hb=fc3d74089cea8f4f7d026daf922d2b89305a7364;hp=7c043a4aa8265bdf74b7bd5d6edc37bba02ab29f;hpb=5d27908667cfa34f7786fdc88e9e09078453637a;p=openvswitch diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 7c043a4a..44e1b284 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -27,10 +27,10 @@ #include "odp-util.h" #include "ofp-util.h" #include "ofpbuf.h" +#include "ofproto-provider.h" #include "pinsched.h" #include "poll-loop.h" #include "pktbuf.h" -#include "private.h" #include "rconn.h" #include "shash.h" #include "timeval.h" @@ -416,6 +416,21 @@ connmgr_get_controller_info(struct connmgr *mgr, struct shash *info) } } +void +connmgr_free_controller_info(struct shash *info) +{ + struct shash_node *node; + + SHASH_FOR_EACH (node, info) { + struct ofproto_controller_info *cinfo = node->data; + while (cinfo->pairs.n) { + free((char *) cinfo->pairs.values[--cinfo->pairs.n]); + } + free(cinfo); + } + shash_destroy(info); +} + /* Changes 'mgr''s set of controllers to the 'n_controllers' controllers in * 'controllers'. */ void