server/proxy: Use new parse_string_array_from_str implementation (using ArrayList)

This commit is contained in:
kubistika 2019-05-12 20:51:54 +03:00
parent 3a750810f7
commit 96616bb18c
2 changed files with 9 additions and 6 deletions

View File

@ -22,6 +22,9 @@
#include "pf_server.h"
#include "pf_config.h"
#include "pf_log.h"
#include "pf_filters.h"
#include <winpr/collections.h>
#define TAG PROXY_TAG("server")
@ -59,15 +62,15 @@ int main(int argc, char* argv[])
{
WLog_INFO(TAG, "Channels mode: WHITELIST");
for (i = 0; i < config->AllowedChannelsCount; i++)
WLog_INFO(TAG, "Allowing %s", config->AllowedChannels[i]);
for (i = 0; i < ArrayList_Count(config->AllowedChannels); i++)
WLog_INFO(TAG, "Allowing %s", (char*) ArrayList_GetItem(config->AllowedChannels, i));
}
else
{
WLog_INFO(TAG, "Channels mode: BLACKLIST");
for (i = 0; i < config->BlockedChannelsCount; i++)
WLog_INFO(TAG, "Blocking %s", config->BlockedChannels[i]);
for (i = 0; i < ArrayList_Count(config->BlockedChannels); i++)
WLog_INFO(TAG, "Blocking %s", (char*) ArrayList_GetItem(config->BlockedChannels, i));
}
status = pf_server_start(config);

View File

@ -58,8 +58,8 @@ struct proxy_config
/* channels */
BOOL WhitelistMode;
char** AllowedChannels;
UINT32 AllowedChannelsCount;
wArrayList* AllowedChannels;
wArrayList* BlockedChannels;
/* filters */
filters_list* Filters;