Make remdesk_virtual_channel_write() static

The function with the same name is defined in multiple libraries
(libfreerdp-shadow.so, libfreerdp-server.so), which might confuse
the dynamic linker at runtime, binding a wrong version of the function
and thus causing segmentation faults.

Since remdesk_virtual_channel_write()s aren't used outside the files
they are defined in, we can declare them static to make them invisible
to the linker.
This commit is contained in:
Jakub Adam 2015-05-19 15:13:32 +02:00
parent 1810656199
commit 2e4948c38c
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ RemdeskClientContext* remdesk_get_client_interface(remdeskPlugin* remdesk)
return pInterface;
}
int remdesk_virtual_channel_write(remdeskPlugin* remdesk, wStream* s)
static int remdesk_virtual_channel_write(remdeskPlugin* remdesk, wStream* s)
{
UINT32 status = 0;

View File

@ -27,7 +27,7 @@
#include "remdesk_main.h"
int remdesk_virtual_channel_write(RemdeskServerContext* context, wStream* s)
static int remdesk_virtual_channel_write(RemdeskServerContext* context, wStream* s)
{
BOOL status;
ULONG BytesWritten = 0;