Fixes for gcc

This commit is contained in:
Simon Walton 2018-03-19 12:53:16 -07:00
parent d889384d94
commit af21cac0c2
3 changed files with 7 additions and 3 deletions

View file

@ -132,18 +132,18 @@ public:
// either to a node (via its active socket) or to a manual sockaddr
qint64 sendUnreliablePacket(const NLPacket& packet, const Node& destinationNode);
qint64 sendUnreliablePacket(const NLPacket& packet, const HifiSockAddr& sockAddr,
HmacAuth& hmacAuth = HmacAuth(), const QUuid& connectionSecret = QUuid());
HmacAuth& hmacAuth = HmacAuth::nullHmacAuth, const QUuid& connectionSecret = QUuid());
// use sendPacket to send a moved unreliable or reliable NL packet to a node's active socket or manual sockaddr
qint64 sendPacket(std::unique_ptr<NLPacket> packet, const Node& destinationNode);
qint64 sendPacket(std::unique_ptr<NLPacket> packet, const HifiSockAddr& sockAddr,
HmacAuth& hmacAuth = HmacAuth(), const QUuid& connectionSecret = QUuid());
HmacAuth& hmacAuth = HmacAuth::nullHmacAuth, const QUuid& connectionSecret = QUuid());
// use sendUnreliableUnorderedPacketList to unreliably send separate packets from the packet list
// either to a node's active socket or to a manual sockaddr
qint64 sendUnreliableUnorderedPacketList(NLPacketList& packetList, const Node& destinationNode);
qint64 sendUnreliableUnorderedPacketList(NLPacketList& packetList, const HifiSockAddr& sockAddr,
HmacAuth& hmacAuth = HmacAuth(), const QUuid& connectionSecret = QUuid());
HmacAuth& hmacAuth = HmacAuth::nullHmacAuth, const QUuid& connectionSecret = QUuid());
// use sendPacketList to send reliable packet lists (ordered or unordered) to a node's active socket
// or to a manual sock addr

View file

@ -7,6 +7,8 @@
#include <QUuid>
HmacAuth HmacAuth::nullHmacAuth;
HmacAuth::HmacAuth(AuthMethod authMethod)
: _hmacContext(new(HMAC_CTX))
, _authMethod(authMethod) {

View file

@ -24,6 +24,8 @@ public:
bool addData(const char * data, int dataLen);
HmacHash result();
static HmacAuth nullHmacAuth;
private:
QMutex _lock;
std::unique_ptr<struct hmac_ctx_st> _hmacContext;