Skip to content

Commit 635e7d1

Browse files
avargaadamgeorge309
authored andcommitted
StpBase: commented to note that calling ie->configChanged() from refreshDisplay() smells
1 parent 610d51c commit 635e7d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/inet/linklayer/ieee8021d/common/StpBase.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void StpBase::refreshDisplay() const
121121
if (nicModule != nullptr) {
122122
std::string buf = std::string(port->getRoleShortName()) + "/" + port->getStateShortName();
123123
nicModule->getDisplayString().setTagArg("t", 0, buf.c_str());
124-
ie->configChanged(NetworkInterface::F_IEEE8021D_DATA);
124+
ie->configChanged(NetworkInterface::F_IEEE8021D_DATA); // KLUDGE: abuse change notification mechanism to trick visualizer into copying the NIC display string onto the link
125125
}
126126
}
127127
else {
@@ -131,7 +131,7 @@ void StpBase::refreshDisplay() const
131131
// label ethernet interface with port status and role
132132
if (nicModule != nullptr) {
133133
nicModule->getDisplayString().setTagArg("t", 0, "");
134-
ie->configChanged(NetworkInterface::F_IEEE8021D_DATA);
134+
ie->configChanged(NetworkInterface::F_IEEE8021D_DATA); // KLUDGE: abuse change notification mechanism to trick visualizer into copying the NIC display string onto the link
135135
}
136136
}
137137
}

0 commit comments

Comments
 (0)