Merge pull request #3577 from akallabeth/error_message_channel_thread

Error message channel thread
This commit is contained in:
Martin Fleisz 2016-11-02 17:58:47 +01:00 committed by GitHub
commit 50c5b40a0c
3 changed files with 17 additions and 1 deletions

View File

@ -275,7 +275,7 @@ static UINT dvcman_load_addin(IWTSVirtualChannelManager* pChannelMgr,
return pDVCPluginEntry((IDRDYNVC_ENTRY_POINTS*) &entryPoints);
}
return CHANNEL_RC_OK;
return ERROR_INVALID_FUNCTION;
}
static DVCMAN_CHANNEL* dvcman_channel_new(IWTSVirtualChannelManager*

View File

@ -32,6 +32,8 @@
#include <freerdp/addin.h>
#include <freerdp/build-config.h>
#include <freerdp/log.h>
#define TAG FREERDP_TAG("addin")
LPSTR freerdp_get_library_install_path(void)
{
@ -293,5 +295,8 @@ PVIRTUALCHANNELENTRY freerdp_load_channel_addin_entry(LPCSTR pszName,
entry = freerdp_load_dynamic_channel_addin_entry(pszName, pszSubsystem, pszType,
dwFlags);
if (!entry)
WLog_WARN(TAG, "Failed to load channel %s [%s]", pszName, pszSubsystem);
return entry;
}

View File

@ -37,6 +37,7 @@
#include <winpr/string.h>
#include <winpr/stream.h>
#include <winpr/wtsapi.h>
#include <winpr/debug.h>
#include <freerdp/freerdp.h>
#include <freerdp/error.h>
@ -63,7 +64,12 @@ void freerdp_channel_init_thread_context(rdpContext* context)
freerdp* freerdp_channel_get_instance(void)
{
if (!s_TLSContext)
{
WLog_ERR(TAG,
"Funcion was called from thread that did not call freerdp_channel_init_thread_context");
winpr_log_backtrace(TAG, WLOG_ERROR, 20);
return NULL;
}
return s_TLSContext->instance;
}
@ -76,7 +82,12 @@ rdpContext* freerdp_channel_get_context(void)
rdpChannels* freerdp_channel_get_channels_context(void)
{
if (!s_TLSContext)
{
WLog_ERR(TAG,
"Funcion was called from thread that did not call freerdp_channel_init_thread_context");
winpr_log_backtrace(TAG, WLOG_ERROR, 20);
return NULL;
}
return s_TLSContext->channels;
}