After a MMSerialPort object is forced close, it may be opened again if some
other object still holds a reference to it. When the MMSerialPort object is
eventually disposed, mm_serial_port_close_force is invoked on the object but
does nothing as 'priv->forced_close' is already set to TRUE. 'priv->watch_id'
is still active, which could potentially lead to a crash if data_available is
called after the MMSerialPort object is finalized. This patch prevents such a
scenario by failing mm_serial_port_open / mm_serial_port_reopen after the
MMSerialPort has been forced close.
Based on a patch from: Bjørn Mork <bjorn@mork.no>
Some messages provide an additional NwError cause code from
the network in case of failure. This means that we need to
parse the reply even if the status indicates failure, to be
able to return the exact failure cause.
When wait_for_final_state_context_complete_and_free is invoked, if the callback
associated with the GSimpleAsyncResult object of the WaitForFinalStateContext
object updates the modem state via mm_iface_modem_update_state, state_changed
is invoked, which causes wait_for_final_state_context_complete_and_free to be
invoked again on the same WaitForFinalStateContext object. That leads to the
following crash, which is observed sometimes when a modem is being disabled.
Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )
0x7fcb7728f202 [libgobject-2.0.so.0.3400.3] - gobject.c:2916 g_object_unref
0x7fcb7743205c [ModemManager] - mm-broadband-modem.c:8034 disabling_context_complete_and_free
0x7fcb77434d64 [ModemManager] - mm-broadband-modem.c:8130 disabling_wait_for_final_state_ready
0x7fcb770c0b86 [libgio-2.0.so.0.3400.3] - gsimpleasyncresult.c:775 g_simple_async_result_complete
0x7fcb7740cdbc [ModemManager] - mm-iface-modem.c:101] wait_for_final_state_context_complete_and_free
0x7fcb7740ce19 [ModemManager] - mm-iface-modem.c:128] state_changed_wait_expired
0x7fcb76f78c33 [libglib-2.0.so.0.3400.3] - gmain.c:4026] g_timeout_dispatch
0x7fcb76f78087 [libglib-2.0.so.0.3400.3] - gmain.c:2715] g_main_context_dispatch
0x7fcb76f78437 [libglib-2.0.so.0.3400.3] - gmain.c:3290] g_main_context_iterate
0x7fcb76f78891 [libglib-2.0.so.0.3400.3] - gmain.c:3484] g_main_loop_run
0x7fcb773f4d55 [ModemManager] - main.c:142] main
0x7fcb7698a9c6 [libc-2.15.so] - libc-start.c:234] __libc_start_main
0x7fcb773f48b8 [ModemManager] + 0x000218b8]
This patch addresses a potential memory leak when load_sim_identifier or
load_imsi in MMSimMbim is called but the caller does not provide a
GAsyncReadyCallback.
This patch addresses a potential memory leak when scan_networks in
MMBroadbandModemMbim is called but the caller does not provide a
GAsyncReadyCallback.
Reported by Aleksander Morgado <aleksander@lanedo.com>
This patch addresses a potential memory leak when
load_operator_identifier or load_operator_name in MMSimMbim is called
but the caller does not provide a GAsyncReadyCallback.
Reported by Aleksander Morgado <aleksander@lanedo.com>
If the bearer doesn't have one of IPv4 or IPv6 configuration, then the
qmi_message_wds_get_current_settings_output_get_ip*_address() functions
will return FALSE with a filled error, which was not cleared.
This fixes a glib warning message about overwriting an already-filled
GError.
Some MMBearer methods to disconnect the bearer assume that the bearer is
disconnected even if the operation fails in a subclass. This leaves MMBearer
and MMBroadbandBearer states out of sync.
This patch notifies the bearer object of the final disconnection using
mm_bearer_report_connection_status. This gives the subclasses a chance to update
their state even when the disconnection attempt fails.
When running the pre-probing VID/PID filters, the ports were not filtered out if
the plugin had configured post-probing vendor/product string filters. But, these
post-probing filters are only applicable to AT ports.
From now on, this logic will not be applied to non-serial ports. In other words,
pre-probing VID/PID filters applied to non-serial ports will always result in
the port being filtered out or being allowed, regardless of any additional
vendor/product string post-probing filter configured by the plugin.
https://bugzilla.gnome.org/show_bug.cgi?id=710437