From fa27d7b11e775d47d0001c3946f80f57a9ea3785 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 13 Mar 2012 12:06:11 -0700 Subject: [PATCH] Added layer to set instruction. --- libguac/include/protocol.h | 5 +++-- libguac/src/protocol.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libguac/include/protocol.h b/libguac/include/protocol.h index 28608f19..aeb4b109 100644 --- a/libguac/include/protocol.h +++ b/libguac/include/protocol.h @@ -344,12 +344,13 @@ int guac_protocol_send_error(guac_socket* socket, const char* error); * returned, and guac_error is set appropriately. * * @param socket The guac_socket connection to use. + * @param layer The layer to set the parameter of. * @param name The name of the parameter to set. * @param value The value to set the parameter to. * @return Zero on success, non-zero on error. */ -int guac_protocol_send_set(guac_socket* socket, const char* name, - const char* value); +int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer, + const char* name, const char* value); /** * Sends a select instruction over the given guac_socket connection. diff --git a/libguac/src/protocol.c b/libguac/src/protocol.c index 86dd40d7..6ec0d069 100644 --- a/libguac/src/protocol.c +++ b/libguac/src/protocol.c @@ -888,11 +888,13 @@ int guac_protocol_send_reset(guac_socket* socket, const guac_layer* layer) { } -int guac_protocol_send_set(guac_socket* socket, const char* name, - const char* value) { +int guac_protocol_send_set(guac_socket* socket, const guac_layer* layer, + const char* name, const char* value) { return guac_socket_write_string(socket, "3.set,") + || __guac_socket_write_length_int(socket, layer->index) + || guac_socket_write_string(socket, ",") || __guac_socket_write_length_string(socket, name) || guac_socket_write_string(socket, ",") || __guac_socket_write_length_string(socket, value)