Skip to content

Commit

Permalink
revent the adv proxy change
Browse files Browse the repository at this point in the history
  • Loading branch information
abtink committed Sep 2, 2023
1 parent 3be09a6 commit 81ecf85
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/sdp_proxy/advertising_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,18 @@ Mdns::Publisher::TxtList AdvertisingProxy::MakeTxtList(const otSrpServerService
{
const uint8_t *txtData;
uint16_t txtDataLength = 0;
otDnsTxtEntryIterator iterator;
otDnsTxtEntry txtEntry;
Mdns::Publisher::TxtList txtList;

txtData = otSrpServerServiceGetTxtData(aSrpService, &txtDataLength);
Mdns::Publisher::DecodeTxtData(txtList, txtData, txtDataLength);

otDnsInitTxtEntryIterator(&iterator, txtData, txtDataLength);

while (otDnsGetNextTxtEntry(&iterator, &txtEntry) == OT_ERROR_NONE)
{
txtList.emplace_back(txtEntry.mKey, txtEntry.mValue, txtEntry.mValueLength);
}

return txtList;
}
Expand Down

0 comments on commit 81ecf85

Please sign in to comment.