Skip to content

Commit 9181b61

Browse files
Adding temp global variable fix and increasing timeout.
1 parent 6768739 commit 9181b61

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/tv-casting-app/linux/simple-app-helper.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ bool gCommissionerGeneratedPasscodeFlowRunning = false;
4141

4242
DiscoveryDelegateImpl * DiscoveryDelegateImpl::_discoveryDelegateImpl = nullptr;
4343
bool gAwaitingCommissionerPasscodeInput = false;
44+
LinuxCommissionableDataProvider gSimpleAppCommissionableDataProvider;
4445
std::shared_ptr<matter::casting::core::CastingPlayer> targetCastingPlayer;
4546

4647
DiscoveryDelegateImpl * DiscoveryDelegateImpl::GetInstance()
@@ -470,9 +471,8 @@ CHIP_ERROR CommandHandler(int argc, char ** argv)
470471
// Commissioner-generated passcode, and then update the CastigApp's AppParameters to update the commissioning session's
471472
// passcode.
472473
LinuxDeviceOptions::GetInstance().payload.setUpPINCode = userEnteredPasscode;
473-
LinuxCommissionableDataProvider gCommissionableDataProvider;
474-
CHIP_ERROR err = CHIP_NO_ERROR;
475-
err = InitCommissionableDataProvider(gCommissionableDataProvider, LinuxDeviceOptions::GetInstance());
474+
CHIP_ERROR err = CHIP_NO_ERROR;
475+
err = InitCommissionableDataProvider(gSimpleAppCommissionableDataProvider, LinuxDeviceOptions::GetInstance());
476476
if (err != CHIP_NO_ERROR)
477477
{
478478
ChipLogError(AppServer,
@@ -482,7 +482,8 @@ CHIP_ERROR CommandHandler(int argc, char ** argv)
482482
}
483483
// Update the CommissionableDataProvider stored in this CastingApp's AppParameters and the CommissionableDataProvider to
484484
// be used for the commissioning session.
485-
err = matter::casting::core::CastingApp::GetInstance()->UpdateCommissionableDataProvider(&gCommissionableDataProvider);
485+
err = matter::casting::core::CastingApp::GetInstance()->UpdateCommissionableDataProvider(
486+
&gSimpleAppCommissionableDataProvider);
486487
if (err != CHIP_NO_ERROR)
487488
{
488489
ChipLogError(AppServer,

scripts/tests/linux/tv_casting_test_sequences.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
Step(app=App.TV_CASTING_APP, input_cmd=f'cast setcommissionerpasscode {int(COMMISSIONER_GENERATED_PASSCODE, 16)}\n'),
215215

216216
# Validate the commissioner passcode that the user entered on the tv-casting-app output.
217-
Step(app=App.TV_CASTING_APP, output_msg=[
217+
Step(app=App.TV_CASTING_APP, timeout_sec=30, output_msg=[
218218
f'CommandHandler() setcommissionerpasscode user-entered passcode: {int(COMMISSIONER_GENERATED_PASSCODE, 16)}']),
219219

220220
# Validate that the `IdentificationDeclaration` message sent from the tv-casting-app to the tv-app will contain the following entries:

0 commit comments

Comments
 (0)