From 454ec971d79a921e2e97516ddb9c725d0cfa607d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 5 Aug 2011 15:56:05 -0700 Subject: [PATCH] ovsdb: Correct specification inconsistency between "lock" and "assert". The "lock" request requires the lock name to be an but it is shown as in the "assert" operation. This corrects the "assert" specification and fixes the suggested naming convention (since ":" is not valid in an ). This commit also updates the implementation to match the specification. Reported-by: Jeremy Stribling --- ovsdb/SPECS | 4 ++-- ovsdb/execution.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ovsdb/SPECS b/ovsdb/SPECS index e2898c2f..5bdb9741 100644 --- a/ovsdb/SPECS +++ b/ovsdb/SPECS @@ -682,7 +682,7 @@ The "locked" and "stolen" notifications (see below) report asynchronous changes to ownership. The scope of a lock is a database server, not a database hosted by -that server. A naming convention, such as ":", +that server. A naming convention, such as "__", can effectively limit the scope of a lock to a particular database. locked @@ -1300,7 +1300,7 @@ assert Request object members: "op": "assert" required - "lock": required + "lock": required Result object members: diff --git a/ovsdb/execution.c b/ovsdb/execution.c index 9e3a8d07..675c1c31 100644 --- a/ovsdb/execution.c +++ b/ovsdb/execution.c @@ -719,7 +719,7 @@ ovsdb_execute_assert(struct ovsdb_execution *x, struct ovsdb_parser *parser, { const struct json *lock_name; - lock_name = ovsdb_parser_member(parser, "lock", OP_STRING); + lock_name = ovsdb_parser_member(parser, "lock", OP_ID); if (!lock_name) { return NULL; } -- 2.30.2