Project

General

Profile

Actions

Bug #3813

closed

osmo_select_main() isn't resetting logging context between callbacks

Added by laforge about 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
libosmocore
Target version:
-
Start date:
02/21/2019
Due date:
% Done:

100%

Spec Reference:

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.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)