Fix segfault 🤦

This commit is contained in:
Your Name
2025-04-26 18:05:18 +12:00
parent 65fad9e1b0
commit 4953d4988d
4 changed files with 24 additions and 7 deletions

View File

@ -188,13 +188,12 @@ void create_server(const std::string &server_name)
void get_all_used_commands(std::set<std::string> &commands)
{
std::set<std::string> template_shell_commands;
std::vector<ServerInfo> servers = get_configured_servers();
for (const auto& server : servers)
{
std::vector<dropshell::ServiceInfo> services = dropshell::get_server_services_info(server.name);
for (const auto& service : services)
template_shell_commands.merge(dropshell::get_used_commands(server.name, service.service_name));
commands.merge(dropshell::get_used_commands(server.name, service.service_name));
}
}