diff options
author | Ben Pfaff <blp@nicira.com> | 2011-06-01 16:17:00 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-06-06 08:58:02 -0700 |
commit | 29d7226e8b17ce1891aaba8f3009715b24fa664f (patch) | |
tree | 444f2e997c8a87f4da51f1d53ab37ff88a96ed12 /ovsdb | |
parent | 1cb29ab050c601448a89eb7311a9f07095921bbd (diff) |
ovsdb: Move ovsdb_table_put_row() into test program.
This function is not useful inside ovsdb itself but only in the
"test-ovsdb" test program. To avoid the temptation to use it incorrectly
inside ovsdb, this commit moves it into the test program.
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/table.c | 14 | ||||
-rw-r--r-- | ovsdb/table.h | 1 |
2 files changed, 0 insertions, 15 deletions
diff --git a/ovsdb/table.c b/ovsdb/table.c index 2ea73bf8..44a205e9 100644 --- a/ovsdb/table.c +++ b/ovsdb/table.c @@ -251,17 +251,3 @@ ovsdb_table_get_row(const struct ovsdb_table *table, const struct uuid *uuid) return NULL; } - -/* This is probably not the function you want. Use ovsdb_txn_row_modify() - * instead. */ -bool -ovsdb_table_put_row(struct ovsdb_table *table, struct ovsdb_row *row) -{ - const struct uuid *uuid = ovsdb_row_get_uuid(row); - if (!ovsdb_table_get_row(table, uuid)) { - hmap_insert(&table->rows, &row->hmap_node, uuid_hash(uuid)); - return true; - } else { - return false; - } -} diff --git a/ovsdb/table.h b/ovsdb/table.h index 95da7403..8e933438 100644 --- a/ovsdb/table.h +++ b/ovsdb/table.h @@ -62,6 +62,5 @@ void ovsdb_table_destroy(struct ovsdb_table *); const struct ovsdb_row *ovsdb_table_get_row(const struct ovsdb_table *, const struct uuid *); -bool ovsdb_table_put_row(struct ovsdb_table *, struct ovsdb_row *); #endif /* ovsdb/table.h */ |