diff --git a/src/protocols/ssh/sftp.c b/src/protocols/ssh/sftp.c index 9e726dab..681545d2 100644 --- a/src/protocols/ssh/sftp.c +++ b/src/protocols/ssh/sftp.c @@ -167,7 +167,14 @@ int guac_sftp_end_handler(guac_client* client, guac_stream* stream) { } -guac_stream* guac_sftp_download_file(guac_client* client, const char* filename) { +int guac_sftp_ack_handler(guac_client* client, guac_stream* stream, + char* message, guac_protocol_status status) { + return 0; +} + +guac_stream* guac_sftp_download_file(guac_client* client, + const char* filename) { + /* STUB */ return NULL; } diff --git a/src/protocols/ssh/sftp.h b/src/protocols/ssh/sftp.h index 257cbdcb..c424259c 100644 --- a/src/protocols/ssh/sftp.h +++ b/src/protocols/ssh/sftp.h @@ -58,6 +58,12 @@ int guac_sftp_blob_handler(guac_client* client, guac_stream* stream, */ int guac_sftp_end_handler(guac_client* client, guac_stream* stream); +/** + * Handler for ack messages which continues an SFTP download. + */ +int guac_sftp_ack_handler(guac_client* client, guac_stream* stream, + char* message, guac_protocol_status status); + /** * Begins (and automatically continues) an SFTP file download to the user. */ diff --git a/src/protocols/ssh/ssh_client.c b/src/protocols/ssh/ssh_client.c index 06961ef8..fb491a28 100644 --- a/src/protocols/ssh/ssh_client.c +++ b/src/protocols/ssh/ssh_client.c @@ -248,6 +248,7 @@ void* ssh_client_thread(void* data) { } /* Set file handlers */ + client->ack_handler = guac_sftp_ack_handler; client->file_handler = guac_sftp_file_handler; client->blob_handler = guac_sftp_blob_handler; client->end_handler = guac_sftp_end_handler; diff --git a/src/protocols/ssh/terminal_handlers.c b/src/protocols/ssh/terminal_handlers.c index 14c4614b..349c9cad 100644 --- a/src/protocols/ssh/terminal_handlers.c +++ b/src/protocols/ssh/terminal_handlers.c @@ -38,6 +38,7 @@ #include #include "common.h" +#include "sftp.h" #include "terminal.h" #include "terminal_handlers.h" #include "char_mappings.h" @@ -920,7 +921,7 @@ int guac_terminal_guac_download(guac_terminal* term, char c) { if (c == 0x9C || c == 0x5C || c == 0x07) { filename[length++] = '\0'; term->char_handler = guac_terminal_echo; - guac_client_log_info(term->client, "STUB: get: %s", filename); + guac_sftp_download_file(term->client, filename); length = 0; }