The mm_report_events_from_cache method is called during the startup and
informs the ModemManager of kernel events. Additionally, hotplug scripts
inform the ModemManager of kernel events. Processed events are stored in
the sysfs cache. It is possible for a hotplug script to write to the
sysfs cache while the mm_report_events_from_cache method is still waiting
for the ModemManager to be available on the bus during startup.
This could lead to a misbehavior where modems are not recognized.
To ensure a clean state on startup, the sysfs cache is cleared after the
ModemManager is available, ensuring reliable processing of kernel events.
Signed-off-by: Oliver Sedlbauer <osedlbauer@tdt.de>
PKG_NAME:=modemmanager
PKG_SOURCE_VERSION:=1.22.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git
}
mm_report_events_from_cache() {
- # Remove the sysfs cache
- rm -f "${MODEMMANAGER_SYSFS_CACHE}"
-
local n=60
local step=1
local mmrunning=0
return
}
+ # Remove the sysfs cache
+ rm -f "${MODEMMANAGER_SYSFS_CACHE}"
+
# Report cached kernel events
while IFS= read -r event_line; do
mm_report_event_from_cache_line "${event_line}"