channels: cleanup unused freerdp channels global functions

This commit is contained in:
Marc-André Moreau 2014-06-11 16:27:31 -04:00
parent 53639dea0b
commit 2a82684521
14 changed files with 10 additions and 52 deletions

View File

@ -203,8 +203,6 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved)
result = init_callback_environment(vm);
setlocale(LC_ALL, "");
freerdp_channels_global_init();
return result;
}

View File

@ -441,8 +441,6 @@ int main(int argc, char* argv[])
setlocale(LC_ALL, "");
freerdp_channels_global_init();
g_sem = CreateSemaphore(NULL, 0, 1, NULL);
instance = freerdp_new();
@ -484,7 +482,5 @@ int main(int argc, char* argv[])
WaitForSingleObject(g_sem, INFINITE);
}
freerdp_channels_global_uninit();
return 0;
}

View File

@ -760,8 +760,6 @@ DWORD fixKeyCode(DWORD keyCode, unichar keyChar, enum APPLE_KEYBOARD_TYPE type)
return;
gdi_free(context->instance);
freerdp_channels_global_uninit();
if (pixel_data)
free(pixel_data);

View File

@ -33,12 +33,11 @@
void mfreerdp_client_global_init()
{
freerdp_handle_signals();
freerdp_channels_global_init();
}
void mfreerdp_client_global_uninit()
{
freerdp_channels_global_uninit();
}
int mfreerdp_client_start(rdpContext* context)

View File

@ -305,8 +305,6 @@ int main(int argc, char* argv[])
rdpChannels* channels;
struct thread_data* data;
freerdp_channels_global_init();
g_sem = CreateSemaphore(NULL, 0, 1, NULL);
instance = freerdp_new();
@ -341,7 +339,5 @@ int main(int argc, char* argv[])
WaitForSingleObject(g_sem, INFINITE);
}
freerdp_channels_global_uninit();
return 0;
}

View File

@ -1169,8 +1169,6 @@ void wfreerdp_client_global_init(void)
wf_create_console();
#endif
freerdp_channels_global_init();
freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0);
}

View File

@ -1787,12 +1787,11 @@ static void xfreerdp_client_global_init()
{
setlocale(LC_ALL, "");
freerdp_handle_signals();
freerdp_channels_global_init();
}
static void xfreerdp_client_global_uninit()
{
freerdp_channels_global_uninit();
}
static int xfreerdp_client_start(rdpContext* context)

View File

@ -303,12 +303,11 @@ void ios_freerdp_free(freerdp* instance)
void ios_init_freerdp()
{
signal(SIGPIPE, SIG_IGN);
freerdp_channels_global_init();
freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0);
}
void ios_uninit_freerdp()
{
freerdp_channels_global_uninit();
}

View File

@ -31,13 +31,11 @@
int init_cliprdr_suite(void)
{
freerdp_channels_global_init();
return 0;
}
int clean_cliprdr_suite(void)
{
freerdp_channels_global_uninit();
return 0;
}

View File

@ -31,13 +31,11 @@
int init_drdynvc_suite(void)
{
freerdp_channels_global_init();
return 0;
}
int clean_drdynvc_suite(void)
{
freerdp_channels_global_uninit();
return 0;
}

View File

@ -46,13 +46,11 @@
int init_rail_suite(void)
{
freerdp_channels_global_init();
return 0;
}
int clean_rail_suite(void)
{
freerdp_channels_global_uninit();
return 0;
}

View File

@ -32,8 +32,6 @@
extern "C" {
#endif
FREERDP_API int freerdp_channels_global_init(void);
FREERDP_API int freerdp_channels_global_uninit(void);
FREERDP_API rdpChannels* freerdp_channels_new(void);
FREERDP_API void freerdp_channels_free(rdpChannels* channels);
FREERDP_API int freerdp_channels_client_load(rdpChannels* channels, rdpSettings* settings,

View File

@ -72,27 +72,14 @@ rdpMcsChannel* freerdp_channels_find_channel_by_name(rdpRdp* rdp, const char* na
return NULL;
}
/**
* this is called shortly after the application starts and
* before any other function in the file
* called only from main thread
*/
int freerdp_channels_global_init(void)
{
return 0;
}
int freerdp_channels_global_uninit(void)
{
return 0;
}
rdpChannels* freerdp_channels_new(void)
{
rdpChannels* channels;
channels = (rdpChannels*) malloc(sizeof(rdpChannels));
ZeroMemory(channels, sizeof(rdpChannels));
channels = (rdpChannels*) calloc(1, sizeof(rdpChannels));
if (!channels)
return NULL;
channels->MsgPipe = MessagePipe_New();
@ -280,10 +267,6 @@ FREERDP_API int freerdp_channels_send_event(rdpChannels* channels, wMessage* eve
switch (GetMessageClass(event->id))
{
case DebugChannel_Class:
name = "rdpdbg";
break;
case CliprdrChannel_Class:
name = "cliprdr";
break;

View File

@ -298,15 +298,15 @@ void svc_plugin_init(rdpSvcPlugin* plugin, CHANNEL_ENTRY_POINTS* pEntryPoints)
plugin->channel_entry_points.pInterface = *(plugin->channel_entry_points.ppInterface);
plugin->channel_entry_points.ppInterface = &(plugin->channel_entry_points.pInterface);
plugin->started = CreateEvent(NULL,TRUE,FALSE,NULL);
plugin->pool = StreamPool_New(TRUE, 10);
plugin->pool = StreamPool_New(TRUE, 10);
svc_plugin_add_init_handle_data(plugin->InitHandle, plugin);
}
void svc_plugin_terminate(rdpSvcPlugin* plugin)
{
StreamPool_Free(plugin->pool);
CloseHandle(plugin->started);
StreamPool_Free(plugin->pool);
CloseHandle(plugin->started);
}
int svc_plugin_send(rdpSvcPlugin* plugin, wStream* data_out)