[ovs-dev] [PATCH 4/5] ovsdb-idl: Remove 'uuid' member of struct ovsdb_idl.
Ben Pfaff
blp at ovn.org
Fri Dec 8 21:24:29 UTC 2017
This was used to uniquely identify the monitor, but there's no need for
that. A fixed monitor name works fine.
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
lib/ovsdb-idl.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index ae6826ac49d4..12009f568575 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -135,7 +135,6 @@ struct ovsdb_idl {
unsigned int state_seqno; /* See above. */
struct json *request_id; /* JSON ID for request awaiting reply. */
struct json *schema; /* Temporary copy of database schema. */
- struct uuid uuid; /* Identifier for monitor. */
/* Database locking. */
char *lock_name; /* Name of lock we need, NULL if none. */
@@ -344,7 +343,6 @@ ovsdb_idl_create(const char *remote, const struct ovsdb_idl_class *class,
idl->schema = NULL;
hmap_init(&idl->outstanding_txns);
- uuid_generate(&idl->uuid);
return idl;
}
@@ -1212,8 +1210,7 @@ static void
ovsdb_idl_send_cond_change(struct ovsdb_idl *idl)
{
int i;
- char uuid[UUID_LEN + 1];
- struct json *params, *json_uuid;
+ struct json *params;
struct jsonrpc_msg *request;
/* When 'idl-request_id' is not NULL, there is an outstanding
@@ -1245,15 +1242,8 @@ ovsdb_idl_send_cond_change(struct ovsdb_idl *idl)
/* Send request if not empty. */
if (monitor_cond_change_requests) {
- snprintf(uuid, sizeof uuid, UUID_FMT,
- UUID_ARGS(&idl->uuid));
- json_uuid = json_string_create(uuid);
-
- /* Create a new uuid */
- uuid_generate(&idl->uuid);
- snprintf(uuid, sizeof uuid, UUID_FMT,
- UUID_ARGS(&idl->uuid));
- params = json_array_create_3(json_uuid, json_string_create(uuid),
+ params = json_array_create_3(json_string_create("monid"),
+ json_string_create("monid"),
monitor_cond_change_requests);
request = jsonrpc_create_request("monitor_cond_change", params,
@@ -1554,7 +1544,6 @@ ovsdb_idl_send_monitor_request__(struct ovsdb_idl *idl,
struct shash *schema;
struct json *monitor_requests;
struct jsonrpc_msg *msg;
- char uuid[UUID_LEN + 1];
size_t i;
schema = parse_schema(idl->schema);
@@ -1613,11 +1602,10 @@ ovsdb_idl_send_monitor_request__(struct ovsdb_idl *idl,
json_destroy(idl->request_id);
- snprintf(uuid, sizeof uuid, UUID_FMT, UUID_ARGS(&idl->uuid));
msg = jsonrpc_create_request(
method,
json_array_create_3(json_string_create(idl->class_->database),
- json_string_create(uuid), monitor_requests),
+ json_string_create("monid"), monitor_requests),
&idl->request_id);
jsonrpc_session_send(idl->session, msg);
idl->cond_changed = false;
--
2.10.2
More information about the dev
mailing list