Fixes regression after 2803fa471e77dc8f227fe00bbf075de7feb10022 where
changing media options fails.
Reported by: np
MFC after: immediately
Differential D29741
ifconfig: Reuse media state in ifmedia_getstate freqlabs on Apr 13 2021, 6:04 AM. Authored by Tags None Referenced Files
Details
Fixes regression after 2803fa471e77dc8f227fe00bbf075de7feb10022 where Reported by: np
Diff Detail
Event TimelineComment Actions So there is a singleton constructor, which caches the result for later usage?
Comment Actions I'm restoring behavior that was removed by mistake, so awkward as it may be, this is how ifconfig already worked before I tidied it up. We only want to get the media status once, because we make changes to it in multiple operations. Right now we're applying each change to a fresh state, rather than accumulating the changes. When we finally get into the callbacks, we end up setting (and freeing) the result of only one operation, then the rest of the changes are skipped (because the callback is a one-shot).
Comment Actions What a ugly piece of code. |