idl: Move vswitch-idl to libopenvswitch.
[sliver-openvswitch.git] / vswitchd / bridge.c
index 6293dad..5b6976a 100644 (file)
@@ -50,7 +50,7 @@
 #include "util.h"
 #include "unixctl.h"
 #include "vlandev.h"
-#include "vswitchd/vswitch-idl.h"
+#include "vswitch-idl.h"
 #include "xenserver.h"
 #include "vlog.h"
 #include "sflow_api.h"
@@ -438,8 +438,12 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
      * has at least one iface, every "struct iface" has a valid ofp_port and
      * netdev. */
     HMAP_FOR_EACH_SAFE (br, next, node, &all_bridges) {
-        if (!br->ofproto && !bridge_add_ofprotos(br)) {
-            bridge_destroy(br);
+        if (!br->ofproto) {
+            if (bridge_add_ofprotos(br)) {
+                bridge_del_ofproto_ports(br);
+            } else {
+                bridge_destroy(br);
+            }
         }
     }
     HMAP_FOR_EACH (br, node, &all_bridges) {
@@ -842,7 +846,7 @@ port_configure_stp(const struct ofproto *ofproto, struct port *port,
     if (config_str) {
         port_s->path_cost = strtoul(config_str, NULL, 10);
     } else {
-        uint32_t current;
+        enum netdev_features current;
 
         if (netdev_get_features(iface->netdev, &current, NULL, NULL, NULL)) {
             /* Couldn't get speed, so assume 100Mb/s. */
@@ -1479,8 +1483,8 @@ iface_refresh_status(struct iface *iface)
 {
     struct shash sh;
 
+    enum netdev_features current;
     enum netdev_flags flags;
-    uint32_t current;
     int64_t bps;
     int mtu;
     int64_t mtu_64;