Merge pull request #1769 from majestrate/fix-sid-2021-10-13

fix debian sid compiler error
This commit is contained in:
Jason Rhinelander 2021-10-16 15:16:37 -03:00 committed by GitHub
commit aee5dd2776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View File

@ -333,7 +333,7 @@ mult96x8_float(__m256 h[192], const __m256 f[96], const __m256 g[96])
/* 96*(16*int8 stored in 32*int8) g inputs between -8 and 8 */
/* 192*16*int16 h outputs between -2400 and 2400 */
static void
mult96x16(__m256i h[192], const __m256i f[96], const __m256i g[96])
mult96x16(__m256i * h, const __m256i * f, const __m256i * g)
{
__m256 hfloat[192];
__m256 gfloat[96];

View File

@ -748,11 +748,14 @@ namespace llarp
LogError("short XMIT from ", m_RemoteAddr);
return;
}
uint16_t sz = bufbe16toh(data.data() + CommandOverhead + PacketOverhead);
uint64_t rxid = bufbe64toh(data.data() + CommandOverhead + sizeof(uint16_t) + PacketOverhead);
ShortHash h{
data.data() + CommandOverhead + sizeof(uint16_t) + sizeof(uint64_t) + PacketOverhead};
LogTrace("rxid=", rxid, " sz=", sz, " h=", h.ToHex(), " from ", m_RemoteAddr);
auto* pos = data.data() + CommandOverhead + PacketOverhead;
uint16_t sz = bufbe16toh(pos);
pos += sizeof(sz);
uint64_t rxid = bufbe64toh(pos);
pos += sizeof(rxid);
auto p2 = pos + ShortHash::SIZE;
assert(p2 == data.data() + XMITOverhead);
LogTrace("rxid=", rxid, " sz=", sz, " h=", oxenmq::to_hex(pos, p2), " from ", m_RemoteAddr);
m_LastRX = m_Parent->Now();
{
// check for replay
@ -769,8 +772,8 @@ namespace llarp
auto itr = m_RXMsgs.find(rxid);
if (itr == m_RXMsgs.end())
{
itr =
m_RXMsgs.emplace(rxid, InboundMessage{rxid, sz, std::move(h), m_Parent->Now()}).first;
itr = m_RXMsgs.emplace(rxid, InboundMessage{rxid, sz, ShortHash{pos}, m_Parent->Now()})
.first;
sz = std::min(sz, uint16_t{FragmentSize});
if ((data.size() - XMITOverhead) == sz)
{