Send driver name as UTF-16 (apparently required, and ASCII flag is ignored).

This commit is contained in:
Michael Jumper 2013-06-22 01:30:58 -07:00
parent dc1fc6132f
commit c07eb9c063
2 changed files with 5 additions and 6 deletions

View File

@ -151,8 +151,7 @@ static void guac_rdpdr_send_client_device_list_announce_request(guac_rdpdrPlugin
/* Printer data */
stream_write_uint32(output_stream, 24 + GUAC_PRINTER_DRIVER_LENGTH + GUAC_PRINTER_NAME_LENGTH);
stream_write_uint32(output_stream,
RDPDR_PRINTER_ANNOUNCE_FLAG_ASCII
| RDPDR_PRINTER_ANNOUNCE_FLAG_DEFAULTPRINTER
RDPDR_PRINTER_ANNOUNCE_FLAG_DEFAULTPRINTER
| RDPDR_PRINTER_ANNOUNCE_FLAG_NETWORKPRINTER);
stream_write_uint32(output_stream, 0); /* reserved - must be 0 */
stream_write_uint32(output_stream, 0); /* PnPName length (PnPName is ultimately ignored) */
@ -188,7 +187,7 @@ void guac_rdpdr_process_server_announce(guac_rdpdrPlugin* rdpdr,
guac_rdpdr_send_client_announce_reply(rdpdr, major, minor, client_id);
/* Name request */
guac_rdpdr_send_client_name_request(rdpdr, "Guacamole");
guac_rdpdr_send_client_name_request(rdpdr, "Guacamole RDP");
}

View File

@ -83,13 +83,13 @@
/**
* Name of the printer driver that should be used on the server.
*/
#define GUAC_PRINTER_DRIVER "MS Publisher Imagesetter"
#define GUAC_PRINTER_DRIVER_LENGTH (strlen(GUAC_PRINTER_DRIVER)+1)
#define GUAC_PRINTER_DRIVER "M\0S\0 \0P\0u\0b\0l\0i\0s\0h\0e\0r\0 \0I\0m\0a\0g\0e\0s\0e\0t\0t\0e\0r\0\0\0"
#define GUAC_PRINTER_DRIVER_LENGTH 50
/**
* Name of the printer itself.
*/
#define GUAC_PRINTER_NAME "\0G\0u\0a\0c\0a\0m\0o\0l\0e\0\0"
#define GUAC_PRINTER_NAME "G\0u\0a\0c\0a\0m\0o\0l\0e\0\0\0"
#define GUAC_PRINTER_NAME_LENGTH 20
/*