GUAC-1164: Delay display resize relative to display manager creation or reconnect.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/db82c6fa Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/db82c6fa Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/db82c6fa Branch: refs/heads/master Commit: db82c6fa027b297c44501d188d00b0b383c565d0 Parents: 3997e44 Author: Michael Jumper <[email protected]> Authored: Wed Mar 16 15:27:24 2016 -0700 Committer: Michael Jumper <[email protected]> Committed: Wed Mar 16 15:27:24 2016 -0700 ---------------------------------------------------------------------- src/protocols/rdp/rdp_disp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/db82c6fa/src/protocols/rdp/rdp_disp.c ---------------------------------------------------------------------- diff --git a/src/protocols/rdp/rdp_disp.c b/src/protocols/rdp/rdp_disp.c index 96c149b..bf31633 100644 --- a/src/protocols/rdp/rdp_disp.c +++ b/src/protocols/rdp/rdp_disp.c @@ -44,7 +44,7 @@ guac_rdp_disp* guac_rdp_disp_alloc() { #endif /* No requests have been made */ - disp->last_request = 0; + disp->last_request = guac_timestamp_current(); disp->requested_width = 0; disp->requested_height = 0; disp->reconnect_needed = 0; @@ -157,8 +157,7 @@ void guac_rdp_disp_update_size(guac_rdp_disp* disp, guac_timestamp now = guac_timestamp_current(); /* Limit display update frequency */ - if (disp->last_request != 0 - && now - disp->last_request <= GUAC_RDP_DISP_UPDATE_INTERVAL) + if (now - disp->last_request <= GUAC_RDP_DISP_UPDATE_INTERVAL) return; /* Do NOT send requests unless the size will change */
