Swap mimetype/filename parameters.

This commit is contained in:
Michael Jumper 2013-06-24 12:41:01 -07:00
parent 8920bc0c76
commit a8b5c9fc5b
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

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