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, ";"); }