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-662: Correct behavior of nested socket. #208

Merged
merged 2 commits into from
Jan 7, 2019

Conversation

mike-jumper
Copy link
Contributor

The nested guac_socket implementation has apparently been broken for some time. Besides the index not being properly initialized, the data written to the socket is (incorrectly) immediately flushed as a "nest" instruction. This behavior has resulted in the nested socket unit test failing.

These changes correct the above, properly initializing the socket index and properly buffering UTF-8 data for eventual flushing as "nest" instructions.

The nested socket implementation seems to have never been properly
updated since guac_socket was changed to rely on implementation-specific
buffering. This meant that absolutely every write resulted in a nest
instruction being sent to the parent socket.

Data should instead be built up within the internal buffer, with each
flush writing as much of the internal buffer as possible within a nest
instruction, leaving any partial UTF-8 characters at the end of the
buffer for later completion with future writes.
@asfgit asfgit merged commit cc4671d into apache:master Jan 7, 2019
@mike-jumper mike-jumper deleted the fix-nest branch January 7, 2019 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants