From 48d1597418348c3e3e6a6715196ace026d6fbce9 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 11 Jun 2014 10:06:18 -0700 Subject: [PATCH] GUAC-730: Fix headers for SSH. --- src/protocols/ssh/client.c | 1 - src/protocols/ssh/client.h | 5 +++-- src/protocols/ssh/clipboard.c | 4 ++++ src/protocols/ssh/guac_handlers.c | 14 +++++--------- src/protocols/ssh/sftp.c | 5 ++--- src/protocols/ssh/sftp.h | 1 + src/protocols/ssh/ssh_agent.c | 9 +++++---- src/protocols/ssh/ssh_buffer.c | 6 ++++-- src/protocols/ssh/ssh_client.c | 31 +++++++++++++++++-------------- src/protocols/ssh/ssh_key.c | 10 +++++++--- src/protocols/ssh/ssh_key.h | 6 +----- 11 files changed, 49 insertions(+), 43 deletions(-) diff --git a/src/protocols/ssh/client.c b/src/protocols/ssh/client.c index f370b5d1..eb538aef 100644 --- a/src/protocols/ssh/client.c +++ b/src/protocols/ssh/client.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include diff --git a/src/protocols/ssh/client.h b/src/protocols/ssh/client.h index 4022f486..9675860c 100644 --- a/src/protocols/ssh/client.h +++ b/src/protocols/ssh/client.h @@ -30,8 +30,6 @@ #include "ssh_key.h" #include "terminal.h" -#include - #include #include @@ -39,6 +37,9 @@ #include "ssh_agent.h" #endif +#include +#include + /** * SSH-specific client data. */ diff --git a/src/protocols/ssh/clipboard.c b/src/protocols/ssh/clipboard.c index 5ec732db..34a86fe7 100644 --- a/src/protocols/ssh/clipboard.c +++ b/src/protocols/ssh/clipboard.c @@ -23,6 +23,10 @@ #include "config.h" #include "client.h" #include "clipboard.h" +#include "terminal.h" + +#include +#include int guac_ssh_clipboard_handler(guac_client* client, guac_stream* stream, char* mimetype) { diff --git a/src/protocols/ssh/guac_handlers.c b/src/protocols/ssh/guac_handlers.c index 13aadeae..efe74e17 100644 --- a/src/protocols/ssh/guac_handlers.c +++ b/src/protocols/ssh/guac_handlers.c @@ -24,20 +24,16 @@ #include "client.h" #include "guac_handlers.h" +#include "ssh_key.h" #include "terminal.h" -#include -#include -#include -#include -#include - #include -#include -#include #include #include -#include +#include + +#include +#include int ssh_guac_client_handle_messages(guac_client* client) { diff --git a/src/protocols/ssh/sftp.c b/src/protocols/ssh/sftp.c index 18c3b407..dacc94d4 100644 --- a/src/protocols/ssh/sftp.c +++ b/src/protocols/ssh/sftp.c @@ -23,15 +23,14 @@ #include "config.h" #include "client.h" +#include "sftp.h" #include #include #include #include -#include -#include -#include +#include #include #include #include diff --git a/src/protocols/ssh/sftp.h b/src/protocols/ssh/sftp.h index 884214a3..0564bf2d 100644 --- a/src/protocols/ssh/sftp.h +++ b/src/protocols/ssh/sftp.h @@ -27,6 +27,7 @@ #include "config.h" #include +#include #include /** diff --git a/src/protocols/ssh/ssh_agent.c b/src/protocols/ssh/ssh_agent.c index 48397ea9..8c54f57b 100644 --- a/src/protocols/ssh/ssh_agent.c +++ b/src/protocols/ssh/ssh_agent.c @@ -26,10 +26,6 @@ #include "ssh_agent.h" #include "ssh_buffer.h" -#include -#include -#include - #include #include #include @@ -37,6 +33,11 @@ #include #include +#include +#include +#include +#include + void ssh_auth_agent_sign(ssh_auth_agent* agent, char* data, int data_length) { LIBSSH2_CHANNEL* channel = agent->channel; diff --git a/src/protocols/ssh/ssh_buffer.c b/src/protocols/ssh/ssh_buffer.c index 64f8de24..4d4d852a 100644 --- a/src/protocols/ssh/ssh_buffer.c +++ b/src/protocols/ssh/ssh_buffer.c @@ -22,10 +22,12 @@ #include "config.h" +#include +#include + #include #include - -#include +#include void buffer_write_byte(char** buffer, uint8_t value) { diff --git a/src/protocols/ssh/ssh_client.c b/src/protocols/ssh/ssh_client.c index 4845ce56..71552bf4 100644 --- a/src/protocols/ssh/ssh_client.c +++ b/src/protocols/ssh/ssh_client.c @@ -23,30 +23,33 @@ #include "config.h" #include "client.h" -#include "guac_handlers.h" #include "sftp.h" #include "ssh_key.h" +#include "terminal.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#ifdef ENABLE_SSH_AGENT +#include "ssh_agent.h" +#endif #include +#include #include #include #include #include -#ifdef ENABLE_SSH_AGENT -#include "ssh_agent.h" -#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include void* ssh_input_thread(void* data) { diff --git a/src/protocols/ssh/ssh_key.c b/src/protocols/ssh/ssh_key.c index ddaa7f78..0097f980 100644 --- a/src/protocols/ssh/ssh_key.c +++ b/src/protocols/ssh/ssh_key.c @@ -25,13 +25,17 @@ #include "ssh_buffer.h" #include "ssh_key.h" -#include - -#include +#include +#include +#include #include +#include #include #include +#include +#include + ssh_key* ssh_key_alloc(char* data, int length, char* passphrase) { ssh_key* key; diff --git a/src/protocols/ssh/ssh_key.h b/src/protocols/ssh/ssh_key.h index 0aed7efa..6291aa11 100644 --- a/src/protocols/ssh/ssh_key.h +++ b/src/protocols/ssh/ssh_key.h @@ -26,11 +26,7 @@ #include "config.h" -#include -#include -#include -#include -#include +#include /** * The expected header of RSA private keys.