From 9e4f74dc717bfe1b6ce861e04456f55c601cd437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Mon, 22 May 2023 21:00:29 +0200 Subject: [PATCH] wifi: Set ChannelSettings after thrown exception in WifiPhy configuration example --- src/wifi/examples/wifi-phy-configuration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wifi/examples/wifi-phy-configuration.cc b/src/wifi/examples/wifi-phy-configuration.cc index abe84bc04..083b0ac23 100644 --- a/src/wifi/examples/wifi-phy-configuration.cc +++ b/src/wifi/examples/wifi-phy-configuration.cc @@ -454,7 +454,6 @@ main(int argc, char* argv[]) NS_ASSERT(phySta->GetChannelWidth() == 20); NS_ASSERT(phySta->GetFrequency() == 5180); NS_ASSERT(exceptionThrown); - phySta->SetAttribute("ChannelSettings", StringValue("{36, 0, BAND_5GHZ, 0}")); exceptionThrown = false; try { @@ -464,6 +463,7 @@ main(int argc, char* argv[]) { exceptionThrown = true; } + phySta->SetAttribute("ChannelSettings", StringValue("{36, 0, BAND_5GHZ, 0}")); // We expect channel number to be 36 and an exception to be thrown NS_ASSERT(phySta->GetChannelNumber() == 36); NS_ASSERT(phySta->GetChannelWidth() == 20);