From a8b5c9fc5bb1adae7fe556d903be28bd4e75077b Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 24 Jun 2013 12:41:01 -0700 Subject: [PATCH] Swap mimetype/filename parameters. --- src/libguac/guacamole/protocol.h | 5 ++--- src/libguac/protocol.c | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libguac/guacamole/protocol.h b/src/libguac/guacamole/protocol.h index ae454494..132cf51a 100644 --- a/src/libguac/guacamole/protocol.h +++ b/src/libguac/guacamole/protocol.h @@ -358,12 +358,11 @@ int guac_protocol_send_audio_end(guac_socket* socket); * @param socket The guac_socket connection to use. * @param index The index of the blob that will contain the contents * of this file. - * @param name A name describing the file being sent. * @param mimetype The mimetype of the data being sent. + * @param name A name describing the file being sent. * @return Zero on success, non-zero on error. */ -int guac_protocol_send_file(guac_socket* socket, int index, - const char* name, const char* mimetype); +int guac_protocol_send_file(guac_socket* socket, int index, const char* mimetype, const char* name); /** * Writes a block of data to the currently in-progress blob which was already diff --git a/src/libguac/protocol.c b/src/libguac/protocol.c index 0f25fae8..b5d2ba09 100644 --- a/src/libguac/protocol.c +++ b/src/libguac/protocol.c @@ -691,15 +691,15 @@ int guac_protocol_send_error(guac_socket* socket, const char* error) { } -int guac_protocol_send_file(guac_socket* socket, int index, const char* name, const char* mimetype) { +int guac_protocol_send_file(guac_socket* socket, int index, const char* mimetype, const char* name) { return guac_socket_write_string(socket, "4.file,") || __guac_socket_write_length_int(socket, index) || guac_socket_write_string(socket, ",") - || __guac_socket_write_length_string(socket, name) - || guac_socket_write_string(socket, ",") || __guac_socket_write_length_string(socket, mimetype) + || guac_socket_write_string(socket, ",") + || __guac_socket_write_length_string(socket, name) || guac_socket_write_string(socket, ";"); }