Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-1267: Add VNC setting 'disable-server-input' #327

Closed
wants to merge 1 commit into from

Conversation

stefan-esq
Copy link
Contributor

Add a new VNC setting 'disable-remote-input' which attempts to turn the remote input off when set to true.

src/protocols/vnc/vnc.c Outdated Show resolved Hide resolved
src/protocols/vnc/settings.h Outdated Show resolved Hide resolved
src/protocols/vnc/settings.c Outdated Show resolved Hide resolved
@stefan-esq stefan-esq force-pushed the GUACAMOLE-1267 branch 2 times, most recently from 8ae47f9 to 75cd1ae Compare January 19, 2021 19:57
@stefan-esq stefan-esq changed the title GUACAMOLE-1267: Add VNC setting 'disable-remote-input' GUACAMOLE-1267: Add VNC setting 'disable-server-input' Jan 19, 2021
msg.pad = 0;

rfbBool success = WriteToRFBServer(rfb_client, (char*)&msg, sz_rfbSetServerInputMsg);
guac_client_log(client, GUAC_LOG_DEBUG, "%s send request to disable server input", success ? "Successfully" : "Failed to");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads well in the case of failure ("Failed to send request ..."), but the grammar gets wonky if things are sent successfully ("Successfully send request ...").

Perhaps it would be better to simply have two separate guac_client_log() calls? That would also allow for the failure case to be logged at a higher log level like GUAC_LOG_WARNING without getting too cluttered.

Comment on lines +390 to +393
rfbSetServerInputMsg msg;
msg.type = rfbSetServerInput;
msg.status = 1;
msg.pad = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - I'm sure this is fine as-is (all structure members are explicitly initialized here), but you can do this quickly and cleanly in one step with:

rfbSetServerInputMsg msg = {
    .type = rfbSetServerInput,
    .status = 1
};

with pad implicitly zeroed.

I'm OK with things as you have them, but just wanted to point the above out. We have additional syntax at our disposal here thanks to the codebase being written for C99.

@necouchman
Copy link
Contributor

@stefan-esq : Any chance you could finish this up and we can get this merged?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants