Merge pull request #2638 from kwitaszczyk/master

Assign peer to settings when a new RDP module is being initialized.
This commit is contained in:
Bernhard Miklautz 2015-05-22 13:36:00 +02:00
commit 7a1485a2e4
2 changed files with 9 additions and 3 deletions

View File

@ -635,6 +635,7 @@ BOOL freerdp_peer_context_new(freerdp_peer* client)
client->context = context;
context->peer = client;
context->ServerMode = TRUE;
if (!(context->metrics = metrics_new(context)))
@ -649,7 +650,6 @@ BOOL freerdp_peer_context_new(freerdp_peer* client)
client->autodetect = rdp->autodetect;
context->rdp = rdp;
context->peer = client;
context->input = client->input;
context->update = client->update;
context->settings = client->settings;

View File

@ -1406,10 +1406,16 @@ rdpRdp* rdp_new(rdpContext* context)
}
rdp->settings = context->settings;
rdp->settings->instance = context->instance;
if (context->instance)
{
rdp->settings->instance = context->instance;
context->instance->settings = rdp->settings;
}
else if (context->peer)
{
rdp->settings->instance = context->peer;
context->peer->settings = rdp->settings;
}
rdp->transport = transport_new(context);