server: proxy: improve logs

This commit is contained in:
Kobi Mizrachi 2020-01-28 15:36:21 +02:00 committed by akallabeth
parent 245fc6014d
commit 4823f41274
2 changed files with 25 additions and 2 deletions

View File

@ -147,7 +147,7 @@ static BOOL pf_client_pre_connect(freerdp* instance)
* Load all required plugins / channels / libraries specified by current * Load all required plugins / channels / libraries specified by current
* settings. * settings.
*/ */
WLog_INFO(TAG, "Loading addins"); LOG_INFO(TAG, pc, "Loading addins");
if (!pf_client_load_rdpsnd(pc, config)) if (!pf_client_load_rdpsnd(pc, config))
{ {
@ -157,7 +157,7 @@ static BOOL pf_client_pre_connect(freerdp* instance)
if (!freerdp_client_load_addins(instance->context->channels, instance->settings)) if (!freerdp_client_load_addins(instance->context->channels, instance->settings))
{ {
WLog_ERR(TAG, "Failed to load addins"); LOG_ERR(TAG, pc, "Failed to load addins");
return FALSE; return FALSE;
} }
@ -312,9 +312,13 @@ static BOOL pf_client_connect_without_nla(pClientContext* pc)
static BOOL pf_client_connect(freerdp* instance) static BOOL pf_client_connect(freerdp* instance)
{ {
pClientContext* pc = (pClientContext*)instance->context; pClientContext* pc = (pClientContext*)instance->context;
rdpSettings* settings = instance->settings;
BOOL rc = FALSE; BOOL rc = FALSE;
BOOL retry = FALSE; BOOL retry = FALSE;
LOG_INFO(TAG, pc, "connecting using client info: Username: %s, Domain: %s", settings->Username,
settings->Domain);
pf_client_set_security_settings(pc); pf_client_set_security_settings(pc);
if (pf_client_should_retry_without_nla(pc)) if (pf_client_should_retry_without_nla(pc))
retry = pc->allow_next_conn_failure = TRUE; retry = pc->allow_next_conn_failure = TRUE;

View File

@ -20,6 +20,7 @@
*/ */
#include <freerdp/display.h> #include <freerdp/display.h>
#include <freerdp/session.h>
#include <winpr/image.h> #include <winpr/image.h>
#include <winpr/sysinfo.h> #include <winpr/sysinfo.h>
@ -188,7 +189,25 @@ static BOOL pf_client_save_session_info(rdpContext* context, UINT32 type, void*
pClientContext* pc = (pClientContext*)context; pClientContext* pc = (pClientContext*)context;
proxyData* pdata = pc->pdata; proxyData* pdata = pc->pdata;
rdpContext* ps = (rdpContext*)pdata->ps; rdpContext* ps = (rdpContext*)pdata->ps;
logon_info* logonInfo = NULL;
WLog_DBG(TAG, __FUNCTION__); WLog_DBG(TAG, __FUNCTION__);
switch (type)
{
case INFO_TYPE_LOGON:
case INFO_TYPE_LOGON_LONG:
{
logonInfo = (logon_info*)data;
LOG_INFO(TAG, pc, "client logon info: Username: %s, Domain: %s", logonInfo->username,
logonInfo->domain);
break;
}
default:
break;
}
return ps->update->SaveSessionInfo(ps, type, data); return ps->update->SaveSessionInfo(ps, type, data);
} }