ovsdb: Fix inverted logic in ovsdb_open().
[sliver-openvswitch.git] / ovsdb / ovsdb.c
index 1a4b6d8..6d0f131 100644 (file)
@@ -204,7 +204,7 @@ ovsdb_open(const char *file_name, bool read_only, struct ovsdb **dbp)
     }
     json_destroy(json);
 
-    db = ovsdb_create(read_only ? file : NULL, schema);
+    db = ovsdb_create(read_only ? NULL : file, schema);
     while ((error = ovsdb_file_read(file, &json)) == NULL && json) {
         struct ovsdb_txn *txn;