From da3caff12ab7764db34ee8c10aa67d42a617aa22 Mon Sep 17 00:00:00 2001 From: Kobi Mizrachi Date: Wed, 8 Jul 2020 11:53:26 +0300 Subject: [PATCH] server: proxy: add extern C for c++ plugins (cherry picked from commit 755d20501bac9c935a88d0ba040a4410681c1aa7) --- server/proxy/pf_client.c | 2 +- server/proxy/pf_config.h | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/server/proxy/pf_client.c b/server/proxy/pf_client.c index 70df81d..86acc38 100644 --- a/server/proxy/pf_client.c +++ b/server/proxy/pf_client.c @@ -319,7 +319,7 @@ static BOOL pf_client_post_connect(freerdp* instance) if (!pf_capture_create_session_directory(pc)) { LOG_ERR(TAG, pc, "pf_capture_create_session_directory failed!"); - return FALSE; + return FALSE; } LOG_ERR(TAG, pc, "frames dir created: %s", pc->frames_dir); diff --git a/server/proxy/pf_config.h b/server/proxy/pf_config.h index 033f680..cb5c6bb 100644 --- a/server/proxy/pf_config.h +++ b/server/proxy/pf_config.h @@ -79,12 +79,21 @@ struct proxy_config typedef struct proxy_config proxyConfig; -FREERDP_API BOOL pf_config_get_uint16(wIniFile* ini, const char* section, const char* key, - UINT16* result); -FREERDP_API BOOL pf_config_get_uint32(wIniFile* ini, const char* section, const char* key, - UINT32* result); -FREERDP_API BOOL pf_config_get_bool(wIniFile* ini, const char* section, const char* key); -FREERDP_API const char* pf_config_get_str(wIniFile* ini, const char* section, const char* key); +#ifdef __cplusplus +extern "C" +{ +#endif + + FREERDP_API BOOL pf_config_get_uint16(wIniFile* ini, const char* section, const char* key, + UINT16* result); + FREERDP_API BOOL pf_config_get_uint32(wIniFile* ini, const char* section, const char* key, + UINT32* result); + FREERDP_API BOOL pf_config_get_bool(wIniFile* ini, const char* section, const char* key); + FREERDP_API const char* pf_config_get_str(wIniFile* ini, const char* section, const char* key); + +#ifdef __cplusplus +}; +#endif proxyConfig* pf_server_config_load(const char* path); void pf_server_config_print(proxyConfig* config); -- 2.7.4