server/proxy: Use new parse_string_array_from_str implementation (using ArrayList)
This commit is contained in:
parent
3a750810f7
commit
96616bb18c
@ -22,6 +22,9 @@
|
|||||||
#include "pf_server.h"
|
#include "pf_server.h"
|
||||||
#include "pf_config.h"
|
#include "pf_config.h"
|
||||||
#include "pf_log.h"
|
#include "pf_log.h"
|
||||||
|
#include "pf_filters.h"
|
||||||
|
|
||||||
|
#include <winpr/collections.h>
|
||||||
|
|
||||||
#define TAG PROXY_TAG("server")
|
#define TAG PROXY_TAG("server")
|
||||||
|
|
||||||
@ -59,15 +62,15 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
WLog_INFO(TAG, "Channels mode: WHITELIST");
|
WLog_INFO(TAG, "Channels mode: WHITELIST");
|
||||||
|
|
||||||
for (i = 0; i < config->AllowedChannelsCount; i++)
|
for (i = 0; i < ArrayList_Count(config->AllowedChannels); i++)
|
||||||
WLog_INFO(TAG, "Allowing %s", config->AllowedChannels[i]);
|
WLog_INFO(TAG, "Allowing %s", (char*) ArrayList_GetItem(config->AllowedChannels, i));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WLog_INFO(TAG, "Channels mode: BLACKLIST");
|
WLog_INFO(TAG, "Channels mode: BLACKLIST");
|
||||||
|
|
||||||
for (i = 0; i < config->BlockedChannelsCount; i++)
|
for (i = 0; i < ArrayList_Count(config->BlockedChannels); i++)
|
||||||
WLog_INFO(TAG, "Blocking %s", config->BlockedChannels[i]);
|
WLog_INFO(TAG, "Blocking %s", (char*) ArrayList_GetItem(config->BlockedChannels, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
status = pf_server_start(config);
|
status = pf_server_start(config);
|
||||||
|
@ -58,8 +58,8 @@ struct proxy_config
|
|||||||
/* channels */
|
/* channels */
|
||||||
BOOL WhitelistMode;
|
BOOL WhitelistMode;
|
||||||
|
|
||||||
char** AllowedChannels;
|
wArrayList* AllowedChannels;
|
||||||
UINT32 AllowedChannelsCount;
|
wArrayList* BlockedChannels;
|
||||||
|
|
||||||
/* filters */
|
/* filters */
|
||||||
filters_list* Filters;
|
filters_list* Filters;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user