server/proxy: Logging and comments improvements
This commit is contained in:
parent
fb3f7f3908
commit
8fbee28dd7
@ -54,7 +54,7 @@
|
||||
#define TAG PROXY_TAG("client")
|
||||
|
||||
/**
|
||||
* Re-negociate with original client after negociation between the proxy
|
||||
* Re-negotiate with original client after negotiation between the proxy
|
||||
* and the target has finished.
|
||||
*/
|
||||
static void proxy_server_reactivate(rdpContext* client, rdpContext* target)
|
||||
@ -75,7 +75,7 @@ static void pf_OnErrorInfo(void* ctx, ErrorInfoEventArgs* e)
|
||||
if (e->code != ERRINFO_NONE)
|
||||
{
|
||||
const char* errorMessage = freerdp_get_error_info_string(e->code);
|
||||
WLog_DBG(TAG, "Client received error info (0x%08"PRIu32"): %s", e->code, errorMessage);
|
||||
WLog_WARN(TAG, "Proxy's client received error info pdu from server: (0x%08"PRIu32"): %s", e->code, errorMessage);
|
||||
/* forward error back to client */
|
||||
freerdp_set_error_info(ps->rdp, e->code);
|
||||
freerdp_send_error_info(ps->rdp);
|
||||
@ -98,6 +98,8 @@ static BOOL pf_client_pre_connect(freerdp* instance)
|
||||
* Only override it if you plan to implement custom order
|
||||
* callbacks or deactiveate certain features.
|
||||
*/
|
||||
|
||||
/* currently not supporting GDI orders */
|
||||
ZeroMemory(instance->settings->OrderSupport, 32);
|
||||
|
||||
/**
|
||||
@ -127,7 +129,7 @@ static BOOL pf_client_pre_connect(freerdp* instance)
|
||||
|
||||
/**
|
||||
* Called after a RDP connection was successfully established.
|
||||
* Settings might have changed during negociation of client / server feature
|
||||
* Settings might have changed during negotiation of client / server feature
|
||||
* support.
|
||||
*
|
||||
* Set up local framebuffers and painting callbacks.
|
||||
|
@ -24,7 +24,7 @@ static UINT pf_disp_monitor_layout(DispServerContext* context,
|
||||
{
|
||||
proxyData* pdata = (proxyData*) context->custom;
|
||||
DispClientContext* client = (DispClientContext*) pdata->pc->disp;
|
||||
WLog_INFO(TAG, __FUNCTION__);
|
||||
WLog_DBG(TAG, __FUNCTION__);
|
||||
return client->SendMonitorLayout(client, pdu->NumMonitors, pdu->Monitors);
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ static UINT pf_disp_on_caps_control(DispClientContext* context, UINT32 MaxNumMon
|
||||
{
|
||||
proxyData* pdata = (proxyData*) context->custom;
|
||||
DispServerContext* server = (DispServerContext*) pdata->ps->disp;
|
||||
WLog_INFO(TAG, __FUNCTION__);
|
||||
WLog_DBG(TAG, __FUNCTION__);
|
||||
/* Update caps of proxy's disp server */
|
||||
server->MaxMonitorAreaFactorA = MaxMonitorAreaFactorA;
|
||||
server->MaxMonitorAreaFactorB = MaxMonitorAreaFactorB;
|
||||
|
@ -89,7 +89,7 @@ static BOOL pf_server_parse_target_from_routing_token(rdpContext* context,
|
||||
|
||||
if ((routing_token_length <= prefix_len) || (routing_token_length >= TARGET_MAX))
|
||||
{
|
||||
WLog_ERR(TAG, "pf_server_parse_target_from_routing_token: bad routing token length: %i",
|
||||
WLog_ERR(TAG, "pf_server_parse_target_from_routing_token(): invalid routing token length: %"PRIu32"",
|
||||
routing_token_length);
|
||||
return FALSE;
|
||||
}
|
||||
@ -103,7 +103,6 @@ static BOOL pf_server_parse_target_from_routing_token(rdpContext* context,
|
||||
CopyMemory(*target, routing_token + prefix_len, len);
|
||||
*(*target + len) = '\0';
|
||||
colon = strchr(*target, ':');
|
||||
WLog_INFO(TAG, "Target [parsed from routing token]: %s", *target);
|
||||
|
||||
if (colon)
|
||||
{
|
||||
@ -126,7 +125,8 @@ static BOOL pf_server_parse_target_from_routing_token(rdpContext* context,
|
||||
static BOOL pf_server_get_target_info(rdpContext* context, rdpSettings* settings,
|
||||
proxyConfig* config)
|
||||
{
|
||||
WLog_INFO(TAG, "pf_server_get_target_info: UseLoadBalanceInfo = %d", config->UseLoadBalanceInfo);
|
||||
WLog_INFO(TAG, "pf_server_get_target_info(): fetching target from %s",
|
||||
config->UseLoadBalanceInfo ? "load-balance-info" : "config");
|
||||
|
||||
if (config->UseLoadBalanceInfo)
|
||||
return pf_server_parse_target_from_routing_token(context, &settings->ServerHostname,
|
||||
@ -140,8 +140,6 @@ static BOOL pf_server_get_target_info(rdpContext* context, rdpSettings* settings
|
||||
}
|
||||
|
||||
settings->ServerPort = config->TargetPort > 0 ? 3389 : settings->ServerPort;
|
||||
WLog_INFO(TAG, "Using target host from config: %s:%i", settings->ServerHostname,
|
||||
settings->ServerPort);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -174,6 +172,9 @@ static BOOL pf_server_post_connect(freerdp_peer* client)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
WLog_INFO(TAG, "pf_server_post_connect(): target == %s:%"PRIu16"", pc->settings->ServerHostname,
|
||||
pc->settings->ServerPort);
|
||||
|
||||
pf_server_rdpgfx_init(ps);
|
||||
pf_server_disp_init(ps);
|
||||
|
||||
@ -233,7 +234,7 @@ static DWORD WINAPI pf_server_handle_client(LPVOID arg)
|
||||
goto out_free_peer;
|
||||
}
|
||||
|
||||
|
||||
/* currently not supporting GDI orders */
|
||||
ZeroMemory(client->settings->OrderSupport, 32);
|
||||
client->update->autoCalculateBitmapData = FALSE;
|
||||
pdata->ps = ps;
|
||||
@ -351,7 +352,7 @@ fail:
|
||||
{
|
||||
if (ps->dispOpened)
|
||||
{
|
||||
WLog_INFO(TAG, "Closing disp server");
|
||||
WLog_DBG(TAG, "Closing RDPEDISP server");
|
||||
(void)ps->disp->Close(ps->disp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user