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

Do not hardcode the UDP listen port in ChipDeviceController #9339

Merged
merged 3 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ DeviceController::DeviceController()
mExchangeMgr = nullptr;
mStorageDelegate = nullptr;
mPairedDevicesInitialized = false;
mListenPort = CHIP_PORT;
}

CHIP_ERROR DeviceController::Init(ControllerInitParams params)
Expand All @@ -120,6 +119,7 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params)
{
mSystemLayer = params.systemLayer;
mInetLayer = params.inetLayer;
mListenPort = params.listenPort;
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions src/controller/CHIPDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ struct ControllerInitParams
ByteSpan controllerRCAC;

uint16_t controllerVendorId;

/* The port used for operational communication to listen for and send messages over UDP/TCP.
* The default value of `0` will pick any available port. */
uint16_t listenPort = 0;
};

enum CommissioningStage : uint8_t
Expand Down