Bug #3813
closedosmo_select_main() isn't resetting logging context between callbacks
100%
Description
When we use log_st_context() in Osmocom programs, we do this in the course of processing a packet. Typically it's because a given packet/message was received from some remote entity. Once we know which subscriber/connection/whatever a packet belongs to, we set the log context because that's how our log filters work.
Most of the applications then call log_reset_context() just before calling osmo_select_main(). Not that only most, not all applications do that. For example, OsmoPCU doesn't do that.
However, even for those applications that have an explicit log_reset_context() call before osmo_select_main(): osmo_select_main() can very well call any number of callback functions for any number of file descriptors in one iteration. This means that the log context survives between those select callbacks.