Beispiel #1
0
static void* android_thread_func(void* param)
{
	freerdp* instance = param;
	
	DEBUG_ANDROID("android_thread_func Start.");

	assert(instance);

	android_freerdp_run(instance);

	DEBUG_ANDROID("android_thread_func Quit.");

	ExitThread(0);
	return NULL;
}
Beispiel #2
0
void* android_thread_func(void* param)
{
	struct thread_data* data;
	data = (struct thread_data*) param;

	assert(data);
	assert(data->instance);

	freerdp* instance = data->instance;
	android_freerdp_run(instance);
	free(data);

	pthread_detach(pthread_self());

	return NULL;
}
Beispiel #3
0
void* android_thread_func(void* param)
{
	struct thread_data* data;
	data = (struct thread_data*) param;

	assert(data);
	assert(data->instance);
	
	DEBUG_ANDROID("Start.");

	freerdp* instance = data->instance;
	android_freerdp_run(instance);
	free(data);

	DEBUG_ANDROID("Quit.");

	ExitThread(0);
	return NULL;
}
Beispiel #4
0
static void* android_thread_func(void* param)
{
	DWORD status = ERROR_BAD_ARGUMENTS;
	freerdp* instance = param;
	WLog_DBG(TAG, "Start...");

	if (!instance || !instance->context)
		goto fail;

	if (freerdp_client_start(instance->context) != CHANNEL_RC_OK)
		goto fail;

	WLog_DBG(TAG, "Connect...");

	if (!freerdp_connect(instance))
		status = GetLastError();
	else
	{
		status = android_freerdp_run(instance);
		WLog_DBG(TAG, "Disonnect...");

		if (!freerdp_disconnect(instance))
			status = GetLastError();
	}

	WLog_DBG(TAG, "Stop...");

	if (freerdp_client_stop(instance->context) != CHANNEL_RC_OK)
		goto fail;

fail:
	WLog_DBG(TAG, "Session ended with %08lX", status);

	if (status == CHANNEL_RC_OK)
		freerdp_callback("OnDisconnected", "(I)V", instance);
	else
		freerdp_callback("OnConnectionFailure", "(I)V", instance);

	WLog_DBG(TAG, "Quit.");
	ExitThread(status);
	return NULL;
}