diff --git a/src/guacd/connection.c b/src/guacd/connection.c index 87efc5a7..6c517bfa 100644 --- a/src/guacd/connection.c +++ b/src/guacd/connection.c @@ -36,7 +36,7 @@ #ifdef ENABLE_SSL #include -#include "libguacd/socket-ssl.h" +#include #endif #include diff --git a/src/libguac/Makefile.am b/src/libguac/Makefile.am index 4590e9fc..0bfa4094 100644 --- a/src/libguac/Makefile.am +++ b/src/libguac/Makefile.am @@ -99,6 +99,11 @@ libguac_la_SOURCES += encode-webp.c noinst_HEADERS += encode-webp.h endif +# SSL support +if ENABLE_SSL +libguac_la_SOURCES += socket-ssl.c +libguacinc_HEADERS += guacamole/socket-ssl.h +endif libguac_la_CFLAGS = \ -Werror -Wall -pedantic -Iguacamole @@ -109,6 +114,7 @@ libguac_la_LDFLAGS = \ @JPEG_LIBS@ \ @PNG_LIBS@ \ @PTHREAD_LIBS@ \ + @SSL_LIBS@ \ @UUID_LIBS@ \ @VORBIS_LIBS@ \ @WEBP_LIBS@ diff --git a/src/libguacd/libguacd/socket-ssl.h b/src/libguac/guacamole/socket-ssl.h similarity index 100% rename from src/libguacd/libguacd/socket-ssl.h rename to src/libguac/guacamole/socket-ssl.h diff --git a/src/libguacd/socket-ssl.c b/src/libguac/socket-ssl.c similarity index 97% rename from src/libguacd/socket-ssl.c rename to src/libguac/socket-ssl.c index cfd2f667..f8f3f87b 100644 --- a/src/libguacd/socket-ssl.c +++ b/src/libguac/socket-ssl.c @@ -19,13 +19,13 @@ #include "config.h" -#include "libguacd/socket-ssl.h" +#include "error.h" +#include "socket-ssl.h" +#include "socket.h" #include #include -#include -#include #include static ssize_t __guac_socket_ssl_read_handler(guac_socket* socket, @@ -93,7 +93,7 @@ static int __guac_socket_ssl_select_handler(guac_socket* socket, int usec_timeou guac_error_message = "Error while waiting for data on secure socket"; } - if (retval == 0) { + else if (retval == 0) { guac_error = GUAC_STATUS_TIMEOUT; guac_error_message = "Timeout while waiting for data on secure socket"; } diff --git a/src/libguacd/Makefile.am b/src/libguacd/Makefile.am index 35eeaf91..c0373f1c 100644 --- a/src/libguacd/Makefile.am +++ b/src/libguacd/Makefile.am @@ -43,12 +43,5 @@ libguacd_la_LIBADD = \ libguacd_la_LDFLAGS = \ -version-info 0:0:0 \ -no-undefined \ - @PTHREAD_LIBS@ \ - @SSL_LIBS@ - -# SSL support -if ENABLE_SSL -libguacdinc_HEADERS += libguacd/socket-ssl.h -libguacd_la_SOURCES += socket-ssl.c -endif + @PTHREAD_LIBS@