Skip to content

Commit

Permalink
core: network and sec are indistinguishable and must both be re-creat…
Browse files Browse the repository at this point in the history
…ed on reconnect

This is needed because network_new steals a reference to rdp->sec and injects a
reference to itself in it.
  • Loading branch information
kiilerix committed Jul 1, 2011
1 parent ac088e0 commit 5b66bdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libfreerdp-core/rdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,11 @@ rdp_reconnect(rdpRdp * rdp)
username = rdp->redirect_username ? rdp->redirect_username : rdp->settings->username;

sec_disconnect(rdp->sec);
network_free(rdp->net);
sec_free(rdp->sec);

rdp->sec = sec_new(rdp);
rdp->net = network_new(rdp);

if (!network_connect(rdp->net, server, username, rdp->settings->tcp_port_rdp))
return False;
Expand Down

0 comments on commit 5b66bdf

Please sign in to comment.