From 96616bb18c8efc413c89a24e8dbc8fddb3e336fb Mon Sep 17 00:00:00 2001 From: kubistika Date: Sun, 12 May 2019 20:51:54 +0300 Subject: [PATCH] server/proxy: Use new parse_string_array_from_str implementation (using ArrayList) --- server/proxy/freerdp_proxy.c | 11 +++++++---- server/proxy/pf_config.h | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/server/proxy/freerdp_proxy.c b/server/proxy/freerdp_proxy.c index d85afd44a..fa4ba92b1 100644 --- a/server/proxy/freerdp_proxy.c +++ b/server/proxy/freerdp_proxy.c @@ -22,6 +22,9 @@ #include "pf_server.h" #include "pf_config.h" #include "pf_log.h" +#include "pf_filters.h" + +#include #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); diff --git a/server/proxy/pf_config.h b/server/proxy/pf_config.h index 26429a1d6..a432cff63 100644 --- a/server/proxy/pf_config.h +++ b/server/proxy/pf_config.h @@ -58,8 +58,8 @@ struct proxy_config /* channels */ BOOL WhitelistMode; - char** AllowedChannels; - UINT32 AllowedChannelsCount; + wArrayList* AllowedChannels; + wArrayList* BlockedChannels; /* filters */ filters_list* Filters;