Skip to content

iface-modem-firmware: fix assert if ports have been removed

The logic to build the generic device ids may run by the time we have already removed the ports in the modem. If so, just cleanly error out and avoid the assertion.

   0x00007df14bb03a3f (libc.so.6 - pthread_kill.c: 44)     __pthread_kill_implementation
   0x00007df14bab8c6c (libc.so.6 - raise.c: 26)    raise
   0x00007df14baa4462 (libc.so.6 - abort.c: 79)    abort
   0x00007df14c2c8686 (libglib-2.0.so.0 - gtestutils.c: 3450)      g_assertion_message
   0x00007df14c2c86fa (libglib-2.0.so.0 - gtestutils.c: 3476)      g_assertion_message_expr
   0x000059ff23c90c90 (ModemManager - mm-iface-modem-firmware.c: 353)      mm_iface_firmware_build_generic_device_ids
   0x000059ff23ceef7d (ModemManager - mm-shared-fibocom.c: 495)    fibocom_at_port_get_firmware_version_ready
   0x00007df14c158e57 (libgio-2.0.so.0 - gtask.c: 1309)    g_task_return_now
   0x00007df14c158e8a (libgio-2.0.so.0 - gtask.c: 1323)    complete_in_idle_cb
   0x00007df14c2a47a4 (libglib-2.0.so.0 - gmain.c: 3460)   g_main_dispatch
   0x00007df14c2a47a4 (libglib-2.0.so.0 - gmain.c: 4200)   g_main_context_dispatch
   0x00007df14c2a4ac3 (libglib-2.0.so.0 - gmain.c: 4276)   g_main_context_iterate
   0x00007df14c2a4d41 (libglib-2.0.so.0 - gmain.c: 4479)   g_main_loop_run
   0x000059ff23c43741 (ModemManager - main.c: 221) main
   0x00007df14baa46c5 (libc.so.6 - libc_start_call_main.h: 58)     __libc_start_call_main
   0x00007df14baa4781 (libc.so.6 - libc-start.c: 389)      __libc_start_main_impl
   0x000059ff23c430b0 (ModemManager + 0x000b00b0)  _start
   0x00007ffc53d5bd27
Edited by Aleksander Morgado

Merge request reports