socket-util: Move get_mtime() here from stream-ssl.
[openvswitch] / ovsdb / ovsdb-tool.c
index b2e200cbb8df38614e7b91208ee1112cb01ecbc0..1c9e9206a154afb130e976c0fa6e10c71b7d4d60 100644 (file)
@@ -207,7 +207,7 @@ compact_or_convert(const char *src_name, const char *dst_name,
     /* Save a copy. */
     check_ovsdb_error(new_schema
                       ? ovsdb_file_open_as_schema(src_name, new_schema, &db)
-                      : ovsdb_file_open(src_name, true, &db));
+                      : ovsdb_file_open(src_name, true, &db, NULL));
     check_ovsdb_error(ovsdb_file_save_copy(dst_name, false, comment, db));
     ovsdb_destroy(db);
 
@@ -248,7 +248,7 @@ transact(bool read_only, const char *db_file_name, const char *transaction)
     struct json *request, *result;
     struct ovsdb *db;
 
-    check_ovsdb_error(ovsdb_file_open(db_file_name, read_only, &db));
+    check_ovsdb_error(ovsdb_file_open(db_file_name, read_only, &db, NULL));
 
     request = parse_json(transaction);
     result = ovsdb_execute(db, request, 0, NULL);
@@ -337,8 +337,13 @@ print_db_changes(struct shash *tables, struct shash *names)
                                                 : xmemdup0(row_uuid, 8)));
                 }
             } else if (columns->type == JSON_NULL) {
+                struct shash_node *node;
+
                 printf("\t\tdelete row\n");
-                shash_delete(names, shash_find(names, row_uuid));
+                node = shash_find(names, row_uuid);
+                if (node) {
+                    shash_delete(names, node);
+                }
                 free(old_name);
             }