weberr13 commented on code in PR #560:
URL: https://github.com/apache/guacamole-server/pull/560#discussion_r2190829333
##########
src/protocols/rdp/gdi.c:
##########
@@ -190,6 +193,45 @@ BOOL guac_rdp_gdi_desktop_resize(rdpContext* context) {
guac_display_layer_close_raw(default_layer, current_context);
+ /* Make json string containing monitor information */
+ char json[JSON_BUFFER_SIZE];
+ int pos = 0;
+ pos += snprintf(json + pos, JSON_BUFFER_SIZE - pos, "{");
Review Comment:
nit: While there may be concerns about grabbing an external dependency, when
it comes to "never re-invent the wheel" any manual string manipulation to do
json generation/parsing is king. Libraries like
https://github.com/nlohmann/json
will allow "C++ like" json parsing and generation that covers all the corner
cases that JSON hides from the average user.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]