From 5b4793e7509b471c65934423e936c3cab58e793e Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Tue, 11 Nov 2014 09:44:21 +0100 Subject: [PATCH] CmdSync - CmdSync::send () is TLSClient specific and breaks the build if libgnutls is not found, so #ifdef it. --- src/commands/CmdSync.cpp | 4 ++-- src/commands/CmdSync.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index 6e85b4847..fbe0ced3b 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -324,6 +324,7 @@ int CmdSync::execute (std::string& output) return status; } +#ifdef HAVE_LIBGNUTLS //////////////////////////////////////////////////////////////////////////////// bool CmdSync::send ( const std::string& to, @@ -334,7 +335,6 @@ bool CmdSync::send ( const Msg& request, Msg& response) { -#ifdef HAVE_LIBGNUTLS std::string::size_type colon = to.rfind (':'); if (colon == std::string::npos) throw format (STRING_CMD_SYNC_BAD_SERVER, to); @@ -367,8 +367,8 @@ bool CmdSync::send ( } // Indicate message failed. -#endif return false; } +#endif //////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdSync.h b/src/commands/CmdSync.h index 9dd50e373..371ee9dcc 100644 --- a/src/commands/CmdSync.h +++ b/src/commands/CmdSync.h @@ -38,8 +38,10 @@ public: CmdSync (); int execute (std::string&); +#ifdef HAVE_LIBGNUTLS private: bool send (const std::string&, const std::string&, const std::string&, const std::string&, const enum TLSClient::trust_level, const Msg&, Msg&); +#endif }; #endif