Commit Graph
5446 Commits
Author SHA1 Message Date
Aleksander Morgado 25007741c8 mmcli,sim: force sync operation for the info action 2017-10-18 23:05:18 +02:00
Aleksander Morgado fc40c059fa broadband-modem-mbim: plug memleak when querying previous unlock retries
==15673== 240 (40 direct, 200 indirect) bytes in 1 blocks are definitely lost in loss record 4,341 of 4,535
    ==15673==    at 0x647F014: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x6460027: ??? (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x6461A54: g_object_newv (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x6462213: g_object_new (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x4E97C33: mm_unlock_retries_new (mm-unlock-retries.c:217)
    ==15673==    by 0x4E97A6F: mm_unlock_retries_new_from_dictionary (mm-unlock-retries.c:171)
    ==15673==    by 0x170B09: mm_iface_modem_get_unlock_retries (mm-iface-modem.c:2942)
    ==15673==    by 0x1DB0A4: pin_query_unlock_retries_ready (mm-broadband-modem-mbim.c:782)
    ==15673==    by 0x613AD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==15673==    by 0x613B775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==15673==    by 0x57D525D: transaction_task_complete_and_free (mbim-device.c:246)
    ==15673==    by 0x57D6086: process_message (mbim-device.c:666)
2017-10-08 10:27:12 +02:00
Aleksander Morgado 58e6f652a1 base-modem: plug memleaks when building port lists
The mm_base_modem_find_ports() method builds a list of full
references, so we need to unref them in the peek() methods.

    ==10047== 14,959 (24 direct, 14,935 indirect) bytes in 1 blocks are definitely lost in loss record 5,470 of 5,473
    ==10047==    at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==10047==    by 0x66E3028: g_malloc (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==10047==    by 0x66FAB25: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==10047==    by 0x66D9A33: g_list_append (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==10047==    by 0x15F6A7: mm_base_modem_find_ports (mm-base-modem.c:845)
    ==10047==    by 0x15E9F3: mm_base_modem_peek_port_qmi_for_data (mm-base-modem.c:579)
    ==10047==    by 0x15E8FC: mm_base_modem_get_port_qmi_for_data (mm-base-modem.c:555)
    ==10047==    by 0x1BB99F: _connect (mm-bearer-qmi.c:1391)
    ==10047==    by 0x1540B4: mm_base_bearer_connect (mm-base-bearer.c:841)
    ==10047==    by 0x181F4F: connection_step (mm-iface-modem-simple.c:597)
    ==10047==    by 0x181321: create_bearer_ready (mm-iface-modem-simple.c:258)
    ==10047==    by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
2017-10-07 14:10:12 +02:00
Aleksander Morgado 882f6b04d6 cinterion: port modem_create_bearer to GTask 2017-10-07 14:10:12 +02:00
Aleksander Morgado e9f56ddf15 cinterion: port after_sim_unlock to GTask 2017-10-07 13:58:55 +02:00
Aleksander Morgado b1948f83a5 cinterion: port load_unlock_retries_context to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado e1b2b88e68 cinterion: port setup_flow_control to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 926e0176fb cinterion: port set_current_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado ea58d35947 cinterion: port load_current_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado c1e17b9cad cinterion: port load_supported_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 7f2520a83d cinterion: port register_in_network to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado f9e2ebf3a0 cinterion: port modem_power_off to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 00aa9cd09b cinterion: port modem_power_down to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 73f748f7ac cinterion: port messaging_check_support to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado d09f9adafe cinterion: port messaging_enable_unsolicited_events to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado 7e478e408d cinterion: port plugin custom_init to GTask 2017-10-07 13:40:30 +02:00
Ben Chan 6e68f4052b nokia: port load_access_technologies to use GTask 2017-10-07 10:56:33 +02:00
Ben Chan d4abf79e99 nokia: port enabling_modem_init to use GTask 2017-10-07 10:56:33 +02:00
Aleksander Morgado 74d8a69b4e iridium: simplify a bit the saved_error logic in connect
Note that saved_error will be freed along with the context, unless
it's set to NULL.
2017-10-07 10:55:16 +02:00
Ben Chan 3c2b974bbd iridium: port connect to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan d0bbc43fa7 iridium: port load_operator_{code,name} to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan 2768df24b4 iridium: port setup_flow_control to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan aee8bcc748 iridium: port load_supported_modes to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan 164ce73847 iridium: port create_bearer to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan 7dc46481c5 pantech: port modem_after_sim_unlock to use GTask 2017-10-07 10:39:47 +02:00
Ben Chan f8a375b1fa broadband-modem-mbim: use device manufacturer information when available
MBIM modems can be supported by the 'generic' plugin. Instead of
treating the plugin name (i.e. Generic) as the manufacturer, it's more
useful to use the manufacturer information reported by the underlying
USB device if that is available.
2017-10-07 10:05:40 +02:00
Ben Chan 3a0d658b5d kerneldevice: add method to retrieve manufacturer information
A USB device may report its manufacturer through the Manufacturer String
Descriptor. That information can sometimes be useful, e.g. MBIM doesn't
define a standard command to query the manufacturer. This patch adds a
method to MMKernelDevice to retrieve the manufacturer information from
the underlying physical device, which can later be used by
MMBroadbandModemMbim to report the manufacturer of a MBIM modem.
2017-10-07 10:05:40 +02:00
Ben Chan bee3f063b4 anydata: remove unused 'port' field in DetailedRegistrationStateContext
The 'port' field in DetailedRegistrationStateContext is initialized to
NULL but never updated or used.

When detailed_registration_state_context_complete_and_free() calls
g_object_unref() on the NULL 'port' field, an assertion is raised.
2017-10-07 10:02:35 +02:00
Ben Chan 1e47692573 simtech: fix memory leak 2017-10-07 10:01:44 +02:00
Ben Chan 25f37fd613 wavecom: fix memory leak 2017-10-07 10:01:29 +02:00
Ben Chan 6967cbfd55 linktop: port set_current_modes to use GTask 2017-10-06 11:06:49 +02:00
Ben Chan 1e75e7e3d9 linktop: port load_supported_modes to use GTask 2017-10-06 11:06:49 +02:00
Aleksander Morgado efaa780de2 port-qmi: don't allow client allocation if port is closed
The internal QmiDevice will be gone when the port is closed, so we
cannot really do anything.

This avoid an issue happening when the modem goes away in the middle
of the client allocation logic performed by MMBroadbandModemQmi:

    ModemManager[24820]: <debug> [1507279407.225777] Couldn't allocate client for service 'wms': Couldn't create client for service 'wms': CID allocation failed in the CTL client: Transaction timed out
    ModemManager[24820]: qmi_device_allocate_client: assertion 'QMI_IS_DEVICE (self)' failed
    ==24820==
    ==24820== Process terminating with default action of signal 5 (SIGTRAP): dumping core
    ==24820==    at 0x66E3411: ??? (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==24820==    by 0x66E46FA: g_logv (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==24820==    by 0x66E484E: g_log (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==24820==    by 0x538E259: qmi_device_allocate_client (qmi-device.c:1008)
    ==24820==    by 0x1F5690: mm_port_qmi_allocate_client (mm-port-qmi.c:157)
    ==24820==    by 0x1D20BA: allocate_next_client (mm-broadband-modem-qmi.c:11319)
    ==24820==    by 0x1D2027: qmi_port_allocate_client_ready (mm-broadband-modem-qmi.c:11306)
    ==24820==    by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==24820==    by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==24820==    by 0x1F54E8: allocate_client_ready (mm-port-qmi.c:113)
    ==24820==    by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==24820==    by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
2017-10-06 10:51:01 +02:00
Ben Chan fd2bfb7e85 novatel-lte: implement load_unlock_retries
This patch implements load_unlock_retries() for the Novatel LTE modem by
using the AT$NWPINR? command to query the number of retries left for
entering PIN1 or PIN2.

Ported from the original patch by Arman Uguray <armansito@chromium.org>:
https://chromium-review.googlesource.com/c/58118
2017-10-06 10:05:28 +02:00
Aleksander Morgado 01ba79b70b simtech: port 3gpp_{setup|cleanup}_unsolicited_messages to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado c04160817a simtech: port 3gpp_enable_unsolicited_events to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado e7fbf6fc56 simtech: port 3gpp_disable_unsolicited_events to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado df4abdec15 simtech: port load_access_technologies to GTask 2017-10-06 10:02:13 +02:00
Aleksander Morgado cda7deea3d simtech: port load_supported_modes to GTask 2017-10-06 10:00:09 +02:00
Aleksander Morgado bf83bb7577 simtech: port load_current_modes to GTask 2017-10-06 10:00:09 +02:00
Aleksander Morgado 9c1f9023e3 simtech: port set_current_modes to GTask 2017-10-06 10:00:09 +02:00
Aleksander Morgado d9de874db3 thuraya: port load_supported_modes to GTask 2017-10-06 09:58:23 +02:00
Aleksander Morgado e072f4bc77 thuraya: port messaging_load_supported_storages to GTask 2017-10-06 09:58:23 +02:00
Aleksander Morgado 0714c01d03 thuraya: port load_operator_{name|code} to GTask 2017-10-06 09:58:23 +02:00
Aleksander Morgado 23124fc6e9 dell: port custom_init to GTask 2017-10-06 09:57:23 +02:00
Aleksander Morgado a1d355784b via: port get_detailed_registration_state() to GTask 2017-10-06 09:55:25 +02:00
Aleksander Morgado 0c8842695f via: port cdma_setup_registration_checks to GTask 2017-10-06 09:46:57 +02:00
Aleksander Morgado d1436ac0c6 altair: port 3gpp_register_in_network to GTask
And also use mm_base_modem_at_command() instead of the full() version,
as we're anyway mm_base_modem_peek_best_at_port().

This commit also fixes the logic where we make sure the finish()
method completes the GTask that is created in the async method
originally.
2017-10-06 09:44:41 +02:00
Aleksander Morgado 4bd15362c5 kerneldevice,generic: plug memleak
==5075== 198 bytes in 18 blocks are definitely lost in loss record 4,486 of 4,761
    ==5075==    at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==5075==    by 0x66E3028: g_malloc (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==5075==    by 0x66CAD42: g_path_get_basename (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==5075==    by 0x20BB7B: preload_interface_sysfs_path (mm-kernel-device-generic.c:184)
    ==5075==    by 0x20C885: preload_contents (mm-kernel-device-generic.c:383)
    ==5075==    by 0x20E2E1: check_preload (mm-kernel-device-generic.c:830)
    ==5075==    by 0x20EA6F: set_property (mm-kernel-device-generic.c:953)
    ==5075==    by 0x6455359: ??? (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==5075==    by 0x6456DBC: g_object_new_valist (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==5075==    by 0x6105E95: g_initable_new_valist (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==5075==    by 0x6105F58: g_initable_new (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==5075==    by 0x20E848: mm_kernel_device_generic_new_with_rules (mm-kernel-device-generic.c:901)
2017-10-05 23:46:42 +02:00
Aleksander Morgado 8cd21e439d kerneldevice,generic: plug memleak
==5075== 333 bytes in 37 blocks are definitely lost in loss record 4,612 of 4,761
    ==5075==    at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==5075==    by 0x66E3028: g_malloc (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==5075==    by 0x66CAD42: g_path_get_basename (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==5075==    by 0x20BE20: preload_driver (mm-kernel-device-generic.c:242)
    ==5075==    by 0x20C8E5: preload_contents (mm-kernel-device-generic.c:391)
    ==5075==    by 0x20E2E1: check_preload (mm-kernel-device-generic.c:830)
    ==5075==    by 0x20EA6F: set_property (mm-kernel-device-generic.c:953)
    ==5075==    by 0x6455359: ??? (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==5075==    by 0x6456DBC: g_object_new_valist (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==5075==    by 0x6105E95: g_initable_new_valist (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==5075==    by 0x6105F58: g_initable_new (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==5075==    by 0x20E848: mm_kernel_device_generic_new_with_rules (mm-kernel-device-generic.c:901)
2017-10-05 23:46:42 +02:00