- CmdSync::send () is TLSClient specific and breaks the build if libgnutls
  is not found, so #ifdef it.
This commit is contained in:
Wilhelm Schuermann 2014-11-11 09:44:21 +01:00 committed by Paul Beckingham
parent 66c303daef
commit 5b4793e750
2 changed files with 4 additions and 2 deletions

View file

@ -324,6 +324,7 @@ int CmdSync::execute (std::string& output)
return status; return status;
} }
#ifdef HAVE_LIBGNUTLS
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool CmdSync::send ( bool CmdSync::send (
const std::string& to, const std::string& to,
@ -334,7 +335,6 @@ bool CmdSync::send (
const Msg& request, const Msg& request,
Msg& response) Msg& response)
{ {
#ifdef HAVE_LIBGNUTLS
std::string::size_type colon = to.rfind (':'); std::string::size_type colon = to.rfind (':');
if (colon == std::string::npos) if (colon == std::string::npos)
throw format (STRING_CMD_SYNC_BAD_SERVER, to); throw format (STRING_CMD_SYNC_BAD_SERVER, to);
@ -367,8 +367,8 @@ bool CmdSync::send (
} }
// Indicate message failed. // Indicate message failed.
#endif
return false; return false;
} }
#endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

View file

@ -38,8 +38,10 @@ public:
CmdSync (); CmdSync ();
int execute (std::string&); int execute (std::string&);
#ifdef HAVE_LIBGNUTLS
private: private:
bool send (const std::string&, const std::string&, const std::string&, const std::string&, const enum TLSClient::trust_level, const Msg&, Msg&); bool send (const std::string&, const std::string&, const std::string&, const std::string&, const enum TLSClient::trust_level, const Msg&, Msg&);
#endif
}; };
#endif #endif