static void rpmb_access_end(void) { start_queue(BOOT1_DEV_NODE); start_queue(BOOT0_DEV_NODE); start_queue(MAIN_DEV_NODE); mutex_unlock(&rpmb_mutex); }
void QContentHubServer::dispatch(msgpack::rpc::request req) { try { std::string method; req.method().convert(&method); if(method == "push") { msgpack::type::tuple<std::string, std::string> params; req.params().convert(¶ms); push_queue(req, params.get<0>(), params.get<1>()); } else if(method == "pop") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); pop_queue(req, params.get<0>()); } else if(method == "push_nowait") { msgpack::type::tuple<std::string, std::string> params; req.params().convert(¶ms); push_queue_nowait(req, params.get<0>(), params.get<1>()); } else if(method == "pop_nowait") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); pop_queue_nowait(req, params.get<0>()); } else if(method == "add") { msgpack::type::tuple<std::string, int> params; req.params().convert(¶ms); add_queue(req, params.get<0>(), params.get<1>()); /* } else if(method == "del") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); del_queue(req, params.get<0>()); } else if(method == "fdel") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); force_del_queue(req, params.get<0>()); */ } else if(method == "set_capacity") { msgpack::type::tuple<std::string, int> params; req.params().convert(¶ms); set_queue_capacity(req, params.get<0>(), params.get<1>()); } else if(method == "start") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); start_queue(req, params.get<0>()); } else if(method == "stop") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); stop_queue(req, params.get<0>()); } else if(method == "clear") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); clear_queue(req, params.get<0>()); } else if(method == "stats") { stats(req); } else if(method == "stat_queue") { msgpack::type::tuple<std::string> params; req.params().convert(¶ms); stat_queue(req, params.get<0>()); } else { req.error(msgpack::rpc::NO_METHOD_ERROR); } } catch (msgpack::type_error& e) { req.error(msgpack::rpc::ARGUMENT_ERROR); return; } catch (std::exception& e) { req.error(std::string(e.what())); return; } }