コード例 #1
0
ファイル: rdpsnd_main.c プロジェクト: alama/freerdp
static void
InitEventProcessConnected(void * pInitHandle, void * pData, uint32 dataLength)
{
	rdpsndPlugin * plugin;
	uint32 error;
	pthread_t thread;

	plugin = (rdpsndPlugin *) chan_plugin_find_by_init_handle(pInitHandle);
	if (plugin == NULL)
	{
		LLOGLN(0, ("InitEventProcessConnected: error no match"));
		return;
	}

	error = plugin->ep.pVirtualChannelOpen(pInitHandle, &(plugin->open_handle),
		plugin->channel_def.name, OpenEvent);
	if (error != CHANNEL_RC_OK)
	{
		LLOGLN(0, ("InitEventProcessConnected: Open failed"));
		return;
	}
	chan_plugin_register_open_handle((rdpChanPlugin *) plugin, plugin->open_handle);

	pthread_create(&thread, 0, thread_func, plugin);
	pthread_detach(thread);
}
コード例 #2
0
ファイル: rail_core_plugin.c プロジェクト: roman-b/FreeRDP
//------------------------------------------------------------------------------
static void
InitEventProcessConnected(void * pInitHandle, void * pData, uint32 dataLength)
{
	railCorePlugin * plugin;
	uint32 error;
	pthread_t thread;

	LLOGLN(10, ("rail_core_plugin:InitEventProcessConnected:"));

	plugin = (railCorePlugin *) chan_plugin_find_by_init_handle(pInitHandle);
	if (plugin == NULL)
	{
		LLOGLN(0, ("rail_core_plugin:InitEventProcessConnected: error no match"));
		return;
	}

	error = plugin->ep.pVirtualChannelOpen(pInitHandle, &(plugin->open_handle),
		plugin->channel_def.name, OpenEvent);
	if (error != CHANNEL_RC_OK)
	{
		LLOGLN(0, ("rail_core_plugin:InitEventProcessConnected: Open failed"));
		return;
	}
	chan_plugin_register_open_handle((rdpChanPlugin *) plugin,
		plugin->open_handle);

	pthread_create(&thread, 0, received_data_processing_thread_func, plugin);
	pthread_detach(thread);

	// Notify RAIL lib about channel connection.
	rail_on_channel_connected(plugin->session);
}