Skip to content

Commit

Permalink
Fix span usage in platform/ESP32 (#29482)
Browse files Browse the repository at this point in the history
* Fix span usage in platform/ESP32

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jan 15, 2024
1 parent 44cf6a1 commit 1028496
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/platform/ESP32/WiFiDnssdImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static CHIP_ERROR OnResolveDone(ResolveContext * ctx)
exit:
if (error != CHIP_NO_ERROR)
{
ctx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(nullptr, 0), error);
ctx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(), error);
}
else
{
Expand Down Expand Up @@ -530,7 +530,7 @@ static void MdnsQueryDone(intptr_t context)
#endif
if (!result)
{
resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(nullptr, 0), CHIP_ERROR_INVALID_ARGUMENT);
resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(), CHIP_ERROR_INVALID_ARGUMENT);
RemoveMdnsQuery(ctx);
return;
}
Expand All @@ -549,10 +549,10 @@ static void MdnsQueryDone(intptr_t context)
mdns_query_async_delete(resolveCtx->mSrvQueryHandle);
resolveCtx->mAddrQueryResult = nullptr;
resolveCtx->mSrvQueryHandle = mdns_query_async_new(result->hostname, NULL, NULL, MDNS_TYPE_AAAA, kTimeoutMilli,
kMaxResults, MdnsQueryNotifier);
kMaxResults, MdnsQueryNotifier);
if (!resolveCtx->mSrvQueryHandle)
{
resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(nullptr, 0), CHIP_ERROR_NO_MEMORY);
resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(), CHIP_ERROR_NO_MEMORY);
RemoveMdnsQuery(ctx);
return;
}
Expand All @@ -565,7 +565,7 @@ static void MdnsQueryDone(intptr_t context)
}
else
{
resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(nullptr, 0), CHIP_ERROR_INCORRECT_STATE);
resolveCtx->mResolveCb(ctx->mCbContext, nullptr, Span<Inet::IPAddress>(), CHIP_ERROR_INCORRECT_STATE);
RemoveMdnsQuery(ctx);
return;
}
Expand Down

0 comments on commit 1028496

Please sign in to comment.