From b21f00c29dc5dd100fad1a55bf88e267ca4b0add Mon Sep 17 00:00:00 2001 From: Nick Couchman Date: Fri, 23 Feb 2018 05:03:34 -0500 Subject: [PATCH] GUACAMOLE-445: Add settings for printer name. --- src/protocols/rdp/rdp_settings.c | 11 +++++++++++ src/protocols/rdp/rdp_settings.h | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index 35f7f202..0ce3e846 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -52,6 +52,7 @@ const char* GUAC_RDP_CLIENT_ARGS[] = { "color-depth", "disable-audio", "enable-printing", + "printer-name", "enable-drive", "drive-path", "create-drive-path", @@ -186,6 +187,11 @@ enum RDP_ARGS_IDX { */ IDX_ENABLE_PRINTING, + /** + * The name of the printer that will be passed through to the RDP server. + */ + IDX_PRINTER_NAME, + /** * "true" if the virtual drive should be enabled, "false" or blank * otherwise. @@ -788,6 +794,11 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user, guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv, IDX_ENABLE_PRINTING, 0); + /* Name of redirected printer */ + settings->printer_name = + guac_user_parse_args_string(user, GUAC_RDP_CLIENT_ARGS, argv, + IDX_PRINTER_NAME, "Guacamole Printer"); + /* Drive enable/disable */ settings->drive_enabled = guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv, diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h index ad71ca06..de2bd17e 100644 --- a/src/protocols/rdp/rdp_settings.h +++ b/src/protocols/rdp/rdp_settings.h @@ -177,6 +177,11 @@ typedef struct guac_rdp_settings { */ int printing_enabled; + /** + * Name of the redirected printer. + */ + char* printer_name; + /** * Whether the virtual drive is enabled. */