CmdSync
- CmdSync::send () is TLSClient specific and breaks the build if libgnutls is not found, so #ifdef it.
This commit is contained in:
committed by
Paul Beckingham
parent
66c303daef
commit
5b4793e750
@@ -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
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user