From 87fe0d0d8eee09b05eeb54b11afdb71907354e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Yhuel?= Date: Tue, 14 Oct 2025 14:22:39 +0200 Subject: [PATCH] [channel,server] fix more unguarded use of functions This allows to set any -DCHANNEL_xxx_SERVER=OFF. --- channels/server/channels.c | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/channels/server/channels.c b/channels/server/channels.c index b684d7c1b..1e7c96ba7 100644 --- a/channels/server/channels.c +++ b/channels/server/channels.c @@ -41,20 +41,36 @@ #if defined(CHANNEL_AUDIN_SERVER) #include #endif +#if defined(CHANNEL_RDPSND_SERVER) #include +#endif +#if defined(CHANNEL_CLIPRDR_SERVER) #include +#endif +#if defined(CHANNEL_ECHO_SERVER) #include +#endif +#if defined(CHANNEL_RDPDR_SERVER) #include +#endif #if defined(CHANNEL_RDPEI_SERVER) #include #endif +#if defined(CHANNEL_DRDYNVC_SERVER) #include +#endif +#if defined(CHANNEL_REMDESK_SERVER) #include +#endif +#if defined(CHANNEL_ENCOMSP_SERVER) #include +#endif #if defined(CHANNEL_RAIL_SERVER) #include #endif +#if defined(CHANNEL_TELEMETRY_SERVER) #include +#endif #if defined(CHANNEL_RDPGFX_SERVER) #include #endif @@ -90,20 +106,36 @@ void freerdp_channels_dummy(void) #if defined(CHANNEL_AUDIN_SERVER) audin_server_context* audin = NULL; #endif +#if defined(CHANNEL_RDPSND_SERVER) RdpsndServerContext* rdpsnd = NULL; +#endif +#if defined(CHANNEL_CLIPRDR_SERVER) CliprdrServerContext* cliprdr = NULL; +#endif +#if defined(CHANNEL_ECHO_SERVER) echo_server_context* echo = NULL; +#endif +#if defined(CHANNEL_RDPDR_SERVER) RdpdrServerContext* rdpdr = NULL; +#endif +#if defined(CHANNEL_DRDYNVC_SERVER) DrdynvcServerContext* drdynvc = NULL; +#endif #if defined(CHANNEL_RDPEI_SERVER) RdpeiServerContext* rdpei = NULL; #endif +#if defined(CHANNEL_REMDESK_SERVER) RemdeskServerContext* remdesk = NULL; +#endif +#if defined(CHANNEL_ENCOMSP_SERVER) EncomspServerContext* encomsp = NULL; +#endif #if defined(CHANNEL_RAIL_SERVER) RailServerContext* rail = NULL; #endif +#if defined(CHANNEL_TELEMETRY_SERVER) TelemetryServerContext* telemetry = NULL; +#endif #if defined(CHANNEL_RDPGFX_SERVER) RdpgfxServerContext* rdpgfx = NULL; #endif @@ -129,30 +161,46 @@ void freerdp_channels_dummy(void) #if defined(CHANNEL_AUDIN_SERVER) audin_server_context_free(audin); #endif +#if defined(CHANNEL_RDPSND_SERVER) rdpsnd = rdpsnd_server_context_new(NULL); rdpsnd_server_context_free(rdpsnd); +#endif +#if defined(CHANNEL_CLIPRDR_SERVER) cliprdr = cliprdr_server_context_new(NULL); cliprdr_server_context_free(cliprdr); +#endif +#if defined(CHANNEL_ECHO_SERVER) echo = echo_server_context_new(NULL); echo_server_context_free(echo); +#endif +#if defined(CHANNEL_RDPDR_SERVER) rdpdr = rdpdr_server_context_new(NULL); rdpdr_server_context_free(rdpdr); +#endif +#if defined(CHANNEL_DRDYNVC_SERVER) drdynvc = drdynvc_server_context_new(NULL); drdynvc_server_context_free(drdynvc); +#endif #if defined(CHANNEL_RDPEI_SERVER) rdpei = rdpei_server_context_new(NULL); rdpei_server_context_free(rdpei); #endif +#if defined(CHANNEL_REMDESK_SERVER) remdesk = remdesk_server_context_new(NULL); remdesk_server_context_free(remdesk); +#endif +#if defined(CHANNEL_ENCOMSP_SERVER) encomsp = encomsp_server_context_new(NULL); encomsp_server_context_free(encomsp); +#endif #if defined(CHANNEL_RAIL_SERVER) rail = rail_server_context_new(NULL); rail_server_context_free(rail); #endif +#if defined(CHANNEL_TELEMETRY_SERVER) telemetry = telemetry_server_context_new(NULL); telemetry_server_context_free(telemetry); +#endif #if defined(CHANNEL_RDPGFX_SERVER) rdpgfx = rdpgfx_server_context_new(NULL); rdpgfx_server_context_free(rdpgfx);