2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ovsdb-server: Factor out complication by using jsonrpc_session.

This commit is contained in:
Ben Pfaff
2009-12-17 15:16:43 -08:00
parent a85c0bbcfd
commit 4931f33ad9
4 changed files with 82 additions and 125 deletions

View File

@@ -244,9 +244,7 @@ ovsdb_idl_run(struct ovsdb_idl *idl)
}
reply = NULL;
if (msg->type == JSONRPC_REQUEST && !strcmp(msg->method, "echo")) {
reply = jsonrpc_create_reply(json_clone(msg->params), msg->id);
} else if (msg->type == JSONRPC_NOTIFY
if (msg->type == JSONRPC_NOTIFY
&& !strcmp(msg->method, "update")
&& msg->params->type == JSON_ARRAY
&& msg->params->u.array.n == 2