Add sessions_alarm

Introduce new feature: sessions_alarm.

Added new account setting: max_connections. On exceeding this number,
user will get an alert. If number is less than 1, no alert will happen.

Tests altered to fit new feature.
This commit is contained in:
John Hernandez
2023-04-13 17:16:24 +02:00
parent 9bce23e075
commit 07cc19ce10
17 changed files with 179 additions and 24 deletions

View File

@@ -776,6 +776,12 @@ connection_get_available_resources(void)
return g_hash_table_get_values(conn.available_resources);
}
int
connection_count_available_resources(void)
{
return g_hash_table_size(conn.available_resources);
}
void
connection_add_available_resource(Resource* resource)
{