[
https://issues.apache.org/jira/browse/GUACAMOLE-1104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17138639#comment-17138639
]
Nick Couchman commented on GUACAMOLE-1104:
------------------------------------------
Just a quick note, here - [~mjumper] may be able to provide more insight, but
if you look at the code for the guac_rdp_disp_update_size() function, you'll
see that it does its own checks as to whether it needs to continue and bails
out pretty early if no updates are requested, or if an update has already
occurred recently enough.
{code:c}
void guac_rdp_disp_update_size(guac_rdp_disp* disp,
guac_rdp_settings* settings, freerdp* rdp_inst) {
int width = disp->requested_width;
int height = disp->requested_height;
/* Do not update size if no requests have been received */
if (width == 0 || height == 0)
return;
guac_timestamp now = guac_timestamp_current();
/* Limit display update frequency */
if (now - disp->last_request <= GUAC_RDP_DISP_UPDATE_INTERVAL)
return;
{code}
That to say, there may be valid reasons why the call is left in there during
the normal loop.
> Remove the multiple calls of guac_rdp_disp_update_size() function in the
> guacamole server
> -----------------------------------------------------------------------------------------
>
> Key: GUACAMOLE-1104
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-1104
> Project: Guacamole
> Issue Type: Improvement
> Components: guacamole-server, RDP
> Affects Versions: 1.1.0
> Reporter: Jimmy
> Priority: Minor
> Labels: easyfix
> Attachments: image-2020-06-17-19-25-20-220.png,
> image-2020-06-17-19-32-30-990.png
>
>
> While using the guacamole server, I found that the
> guac_rdp_disp_update_size() function is unnecessarily several times called.
> This function is called when resizing the browser.
> The call stack of this function follows as below:
> !image-2020-06-17-19-25-20-220.png!
>
> This call is normal.
> But this function is continuously called in the loop of the
> guac_rdp_handle_connection() function regardless of the resizing of the
> browser.
> !image-2020-06-17-19-32-30-990.png!
>
> I removed the call and tested the relevant features such as resizing.
> It works well.
> So I think that we have to remove this call.
> If this issue is accepted by you, I want to fix it myself.
> Thanks.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)