GUACAMOLE-172: Use frame start as end of previous frame (ignore server-side time).
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/234f9870 Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/234f9870 Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/234f9870 Branch: refs/heads/master Commit: 234f98705ea8b9a56fda43fb7c1682e675760cb2 Parents: f641d91 Author: Michael Jumper <[email protected]> Authored: Fri Oct 14 13:31:41 2016 -0700 Committer: Michael Jumper <[email protected]> Committed: Tue Jan 24 00:18:07 2017 -0800 ---------------------------------------------------------------------- src/protocols/rdp/rdp.c | 14 +++++++------- src/protocols/vnc/vnc.c | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/234f9870/src/protocols/rdp/rdp.c ---------------------------------------------------------------------- diff --git a/src/protocols/rdp/rdp.c b/src/protocols/rdp/rdp.c index cf55c75..91f6eb9 100644 --- a/src/protocols/rdp/rdp.c +++ b/src/protocols/rdp/rdp.c @@ -832,6 +832,13 @@ static int guac_rdp_handle_connection(guac_client* client) { break; } while (wait_result > 0); + + /* Record end of frame, excluding server-side rendering time (we + * assume server-side rendering time will be consistent between any + * two subsequent frames, and that this time should thus be + * excluded from the required wait period of the next frame). */ + last_frame_end = frame_start; + } /* If an error occurred, fail */ @@ -839,14 +846,7 @@ static int guac_rdp_handle_connection(guac_client* client) { guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, "Connection closed."); - /* Record end of frame, excluding server-side rendering time (we assume - * server-side rendering time will be consistent between any two - * subsequent frames, and that this time should thus be excluded from - * the required wait period of the next frame). */ - last_frame_end = guac_timestamp_current(); - /* Flush frame */ - /* End of frame */ guac_common_display_flush(rdp_client->display); guac_client_end_frame(client); guac_socket_flush(client->socket); http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/234f9870/src/protocols/vnc/vnc.c ---------------------------------------------------------------------- diff --git a/src/protocols/vnc/vnc.c b/src/protocols/vnc/vnc.c index 4f1e8da..db56d8b 100644 --- a/src/protocols/vnc/vnc.c +++ b/src/protocols/vnc/vnc.c @@ -402,18 +402,18 @@ void* guac_vnc_client_thread(void* data) { } while (wait_result > 0); + /* Record end of frame, excluding server-side rendering time (we + * assume server-side rendering time will be consistent between any + * two subsequent frames, and that this time should thus be + * excluded from the required wait period of the next frame). */ + last_frame_end = frame_start; + } /* If an error occurs, log it and fail */ if (wait_result < 0) guac_client_abort(client, GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR, "Connection closed."); - /* Record end of frame, excluding server-side rendering time (we assume - * server-side rendering time will be consistent between any two - * subsequent frames, and that this time should thus be excluded from - * the required wait period of the next frame). */ - last_frame_end = guac_timestamp_current(); - /* Flush frame */ guac_common_surface_flush(vnc_client->display->default_surface); guac_client_end_frame(client);
