-\f
-static void
-ovsdb_transact(struct unixctl_conn *conn, const char *args, void *db_)
-{
- struct ovsdb *db = db_;
- struct json *request, *reply;
- char *reply_string;
-
- /* Parse JSON. */
- request = json_from_string(args);
- if (request->type == JSON_STRING) {
- unixctl_command_reply(conn, 501, request->u.string);
- json_destroy(request);
- return;
- }
-
- /* Execute command. */
- reply = ovsdb_execute(db, request, 0, NULL);
- reply_string = json_to_string(reply, 0);
- unixctl_command_reply(conn, 200, reply_string);
- free(reply_string);
- json_destroy(reply);
-}