Skip to content

Commit

Permalink
Fix build: references to bufbound replaced with bufferwriter (#4120)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Dec 8, 2020
1 parent 0e2b4a4 commit 9df28b5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/lib/mdns/minimal/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ bool QueryData::Parse(const BytesRange & validData, const uint8_t ** start)
return true;
}

bool QueryData::Append(HeaderRef & hdr, chip::BufBound & out) const
bool QueryData::Append(HeaderRef & hdr, chip::Encoding::BigEndian::BufferWriter & out) const
{
if ((hdr.GetAdditionalCount() != 0) || (hdr.GetAnswerCount() != 0) || (hdr.GetAuthorityCount() != 0))
{
return false;
}

GetName().Put(out);
out.PutBE16(static_cast<uint16_t>(mType));
out.PutBE16(static_cast<uint16_t>(mClass) | (mAnswerViaUnicast ? kQClassUnicastAnswerFlag : 0));
out.Put16(static_cast<uint16_t>(mType));
out.Put16(static_cast<uint16_t>(mClass) | (mAnswerViaUnicast ? kQClassUnicastAnswerFlag : 0));

if (out.Fit())
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class QueryData
bool Parse(const BytesRange & validData, const uint8_t ** start);

/// Write out this query data back into an output buffer.
bool Append(HeaderRef & hdr, chip::BufBound & out) const;
bool Append(HeaderRef & hdr, chip::Encoding::BigEndian::BufferWriter & out) const;

private:
QType mType = QType::ANY;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/ResponseBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class ResponseBuilder
return *this;
}

chip::BufBound out(mPacket->Start() + mPacket->DataLength(), mPacket->AvailableDataLength());
chip::Encoding::BigEndian::BufferWriter out(mPacket->Start() + mPacket->DataLength(), mPacket->AvailableDataLength());

if (!query.Append(mHeader, out))
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/core/QName.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class SerializedQNameIterator
bool operator==(const FullQName & other) const;
bool operator!=(const FullQName & other) const { return !(*this == other); }

void Put(chip::BufBound & out) const
void Put(chip::Encoding::BigEndian::BufferWriter & out) const
{
SerializedQNameIterator copy = *this;
while (copy.Next())
Expand Down

0 comments on commit 9df28b5

Please sign in to comment.