Skip to content

Commit

Permalink
Align the flag check between InetLayer::Init and InetLayer::Shutdown (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored Jun 28, 2021
1 parent a89a079 commit 10a7ac6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/inet/InetLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,12 @@ INET_ERROR InetLayer::Init(chip::System::Layer & aSystemLayer, void * aContext)

State = kState_Initialized;

#if CHIP_SYSTEM_CONFIG_USE_SOCKETS
#if INET_CONFIG_ENABLE_DNS_RESOLVER && INET_CONFIG_ENABLE_ASYNC_DNS_SOCKETS

#if INET_CONFIG_ENABLE_DNS_RESOLVER
#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && INET_CONFIG_ENABLE_ASYNC_DNS_SOCKETS
err = mAsyncDNSResolver.Init(this);
SuccessOrExit(err);

#endif // INET_CONFIG_ENABLE_DNS_RESOLVER && INET_CONFIG_ENABLE_ASYNC_DNS_SOCKETS
#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS
#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && INET_CONFIG_ENABLE_ASYNC_DNS_SOCKETS
#endif // INET_CONFIG_ENABLE_DNS_RESOLVER

exit:
Platform::InetLayer::DidInit(this, mContext, err);
Expand Down

0 comments on commit 10a7ac6

Please sign in to comment.