Aleksander Morgado 25011ec733 port-serial: flash cancellation always completed in idle
We cannot complete the flash task cancellation right away because this
may be called from within _close_internal() during a forced port close
after the TTY has gone, which would mean the object is fully disposed
already after the flash cancellation has been requested.

By making the task cancellation complete in idle, we're sure that
there will be at least one reference valid (the one in the task)
during the port close operation.

  ModemManager[25156]: <debug> [1568121341.696563] Modem (Generic) '/sys/devices/pci0000:00/0000:00:00.0' completely disposed
  **
  ERROR:mm-port-serial.c:2067:finalize: assertion failed: (self->priv->iochannel == NULL)

  (gdb) bt
  #0  0x00007ffff757c755 in raise () at /usr/lib/libc.so.6
  #1  0x00007ffff7567851 in abort () at /usr/lib/libc.so.6
  #2  0x00007ffff7741062 in  () at /usr/lib/libglib-2.0.so.0
  #3  0x00007ffff776d99d in g_assertion_message_expr () at /usr/lib/libglib-2.0.so.0
  #4  0x0000555555662f0a in finalize (object=0x55555577a380) at mm-port-serial.c:2067
  #5  0x0000555555664d81 in finalize (object=0x55555577a380) at mm-port-serial-at.c:632
  #6  0x00007ffff787b351 in g_object_unref () at /usr/lib/libgobject-2.0.so.0
  #7  0x00007ffff795d5eb in  () at /usr/lib/libgio-2.0.so.0
  #8  0x00007ffff787b351 in g_object_unref () at /usr/lib/libgobject-2.0.so.0
  #9  0x0000555555662126 in mm_port_serial_flash_cancel (self=0x55555577a380) at mm-port-serial.c:1747
  #10 0x0000555555661224 in _close_internal (self=0x55555577a380, force=1) at mm-port-serial.c:1397
  #11 0x000055555566197b in port_serial_close_force (self=0x55555577a380) at mm-port-serial.c:1526
  #12 0x000055555565fbe5 in common_input_available (self=0x55555577a380, condition=(G_IO_IN | G_IO_ERR | G_IO_HUP)) at mm-port-serial.c:971
  #13 0x00005555556600c0 in iochannel_input_available (iochannel=0x55555578a0a0, condition=(G_IO_IN | G_IO_ERR | G_IO_HUP), data=0x55555577a380) at mm-port-serial.c:1073
  #14 0x00007ffff778ebb0 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
  #15 0x00007ffff7790b11 in  () at /usr/lib/libglib-2.0.so.0
  #16 0x00007ffff7791a63 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
  #17 0x000055555559afb0 in main (argc=3, argv=0x7fffffffea58) at main.c:181
2019-09-11 14:34:40 +00:00
2019-09-04 10:37:39 -07:00
2019-08-29 12:05:09 +00:00
2019-09-11 13:56:57 +00:00
2019-07-02 09:47:48 +02:00
2019-07-31 22:27:45 -07:00
2013-08-14 13:30:35 +02:00
2017-09-07 13:45:57 +02:00
2013-08-14 15:43:28 +02:00
2017-09-07 13:45:57 +02:00
2019-04-02 11:20:11 -05:00
2019-01-16 10:15:07 +01:00
2019-09-04 10:35:52 -07:00
2018-01-25 09:52:12 +01:00

ModemManager.
ModemManager provides a unified high level API for communicating with mobile
broadband modems, regardless of the protocol used to communicate with the
actual device (Generic AT, vendor-specific AT, QCDM, QMI, MBIM...).

Using.
ModemManager is a system daemon and is not meant to be used directly from
the command line. However, since it provides a DBus API, it is possible to use
'dbus-send' commands or the new 'mmcli' command line interface to control it
from the terminal. The devices are queried from udev and automatically updated
based on hardware events, although a manual re-scan can also be requested to
look for RS232 modems.

Implementation.
ModemManager is a DBus system bus activated service (meaning it's started
automatically when a request arrives). It is written in C, using glib and gio.
Several GInterfaces specify different features that the modems support,
including the generic MMIfaceModem3gpp and MMIfaceModemCdma which provide basic
operations for 3GPP (GSM, UMTS, LTE) or CDMA (CDMA1x, EV-DO) modems. If a given
feature is not available in the modem, the specific interface will not be
exported in DBus.

Plugins.
Plugins are loaded on startup, and must implement the MMPlugin interface. It
consists of a couple of methods which tell the daemon whether the plugin
supports a port and to create custom MMBroadbandModem implementations. It most
likely makes sense to derive custom modem implementations from one of the
generic classes and just add (or override) operations which are not standard.
There are multiple fully working plugins in the plugins/ directory that can be
used as an example for writing new plugins. Writing new plugins is highly
encouraged! The plugin API is open for changes, so if you're writing a plugin
and need to add or change some public method, feel free to suggest it!

License.
The ModemManager and mmcli binaries are both GPLv2+.
The libmm-glib library is LGPLv2+.
S
Description
No description provided
Readme
19 MiB
Languages
C 98.6%
Meson 0.8%
Python 0.4%
Shell 0.2%