- 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;
}
#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
////////////////////////////////////////////////////////////////////////////////

View file

@ -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