GUACAMOLE-623: Fix build against older libwebsockets. #192
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build is currently broken on CentOS 7 with EPEL, where libwebsockets is available but at version 1.7.5. Several differences are in play which needed to be addressed here:
lws_callback_http_dummy()function which must be invoked within the event callback to perform some sort of housekeeping tasks internal to libwebsockets is not defined. The event callback is instead expected to simply return 0.pwsimember of thelws_client_connect_infostructure does not exist. This can safely be removed - our original purpose for using it, exposing theguac_clientto the event callback, no longer exists as theguac_clientis exposed through a static variable instead.ignore_certis set, rather than just asking nicely.LWS_CALLBACK_CLOSEDevents under some circumstances, instead only firingLWS_CALLBACK_WSI_DESTROYfor the destruction of the WebSocket structure. Both need to be handled for the connection to close cleanly in all cases.