+
+ if (success) {
+ reply = jsonrpc_create_reply(body_json, conn->request_id);
+ } else {
+ reply = jsonrpc_create_error(body_json, conn->request_id);
+ }
+
+ if (VLOG_IS_DBG_ENABLED()) {
+ char *id = json_to_string(conn->request_id, 0);
+ VLOG_DBG("replying with %s, id=%s: \"%s\"",
+ success ? "success" : "error", id, body);
+ free(id);
+ }
+
+ /* If jsonrpc_send() returns an error, the run loop will take care of the
+ * problem eventually. */
+ jsonrpc_send(conn->rpc, reply);
+ json_destroy(conn->request_id);
+ conn->request_id = NULL;