Skip to content

Commit

Permalink
session-rdp: Add send_server_redirection method
Browse files Browse the repository at this point in the history
This method will be used by daemon-system to send a server redirection PDU to
a RDP client on handover process.

To send the server redirection PDU it is using the recently merged method from
FreeRDP: FreeRDP/FreeRDP#8252 .
  • Loading branch information
joantolo committed Nov 24, 2023
1 parent 73f080f commit 7e66fa3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/grd-session-rdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,18 @@ grd_session_rdp_hide_pointer (GrdSessionRdp *session_rdp)
rdp_update->pointer->PointerSystem (rdp_context, &pointer_system);
}

void
grd_session_rdp_send_server_redirection (GrdSessionRdp *session_rdp,
const char *routing_token,
const char *user_name,
const char *password)
{
freerdp_peer *peer = session_rdp->peer;

peer->SendServerRedirection (peer, 0, NULL, routing_token, user_name, NULL,
password, NULL, NULL, 0, NULL, 0, NULL);
}

static void
maybe_queue_close_session_idle (GrdSessionRdp *session_rdp)
{
Expand Down
5 changes: 5 additions & 0 deletions src/grd-session-rdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,9 @@ void grd_session_rdp_update_pointer (GrdSessionRdp *session_rdp,

void grd_session_rdp_hide_pointer (GrdSessionRdp *session_rdp);

void grd_session_rdp_send_server_redirection (GrdSessionRdp *session_rdp,
const char *routing_token,
const char *user_name,
const char *password);

#endif /* GRD_SESSION_RDP_H */

0 comments on commit 7e66fa3

Please sign in to comment.