Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OperationalSessionSetup a bit smaller. #24805

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/app/OperationalSessionSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate,
void OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason) override;

private:
enum class State
enum class State : uint8_t
{
Uninitialized, // Error state: OperationalSessionSetup is useless
NeedsAddress, // No address known, lookup not started yet.
Expand All @@ -247,10 +247,6 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate,

Transport::PeerAddress mDeviceAddress = Transport::PeerAddress::UDP(Inet::IPAddress::Any);

void MoveToState(State aTargetState);

State mState = State::Uninitialized;

SessionHolderWithDelegate mSecureSession;

Callback::CallbackDeque mConnectionSuccess;
Expand All @@ -261,8 +257,12 @@ class DLL_EXPORT OperationalSessionSetup : public SessionDelegate,
/// This is used when a node address is required.
chip::AddressResolve::NodeLookupHandle mAddressLookupHandle;

State mState = State::Uninitialized;

bool mPerformingAddressUpdate = false;

void MoveToState(State aTargetState);

CHIP_ERROR EstablishConnection(const ReliableMessageProtocolConfig & config);

/*
Expand Down