New config file structure. (#201)

This commit is contained in:
Savinda Senevirathne
2020-12-23 18:52:58 +05:30
committed by GitHub
parent 1a954ad96e
commit e835e18d18
22 changed files with 450 additions and 393 deletions

View File

@@ -18,7 +18,7 @@ namespace usr
int handle_user_connect(usr::user_comm_session &session)
{
// Allow connection only if the maximum capacity is not reached. 0 means allowing unlimited connections.
if ((conf::cfg.pubmaxcons == 0) || (usr::ctx.users.size() < conf::cfg.pubmaxcons))
if ((conf::cfg.user.max_connections == 0) || (usr::ctx.users.size() < conf::cfg.user.max_connections))
{
corebill::add_to_whitelist(session.host_address);
LOG_DEBUG << "User client connected " << session.display_name();
@@ -35,7 +35,7 @@ namespace usr
}
else
{
LOG_DEBUG << "Dropping the user connection. Maximum user capacity reached. Session: " << session.display_name() << " (limit: " << conf::cfg.pubmaxcons << ").";
LOG_DEBUG << "Dropping the user connection. Maximum user capacity reached. Session: " << session.display_name() << " (limit: " << conf::cfg.user.max_connections << ").";
return -1;
}
}