ovsdb: Fix ovsdb-server crash when specifying nonexistent file.
[openvswitch] / ofproto / ofproto.c
index a5edf9e1c9d9954998c2cef33162d286c0214596..fcc76d6cbfee19f9b75d6e1d30f9fccdd3e9ea7d 100644 (file)
@@ -2597,7 +2597,7 @@ query_stats(struct ofproto *p, struct rule *rule,
         odp_flows[0].key = rule->cr.flow;
     }
 
-    /* Fetch up-to-date statistics from the datapath and add them in. */ */
+    /* Fetch up-to-date statistics from the datapath and add them in. */
     if (!dpif_flow_get_multiple(p->dpif, odp_flows, n_odp_flows)) {
         size_t i;
         for (i = 0; i < n_odp_flows; i++) {
@@ -3335,7 +3335,7 @@ compose_flow_removed(const struct rule *rule, long long int now, uint8_t reason)
 {
     struct ofp_flow_removed *ofr;
     struct ofpbuf *buf;
-    long long int tdiff = time_msec() - rule->created;
+    long long int tdiff = now - rule->created;
     uint32_t sec = tdiff / 1000;
     uint32_t msec = tdiff - (sec * 1000);