Age | Commit message (Collapse) | Author |
|
We want to ensure that all errors reported via DBus operations are
normalized to MM-specific errors.
We don't want to return QMI or MBIM specific errors, as those are
protocol specific and we don't want DBus clients to need to rely on
knowing which is the protocol in use by the device.
|
|
Emit the "Updated" signal max one time per 2 seconds, even if we get
many more notifications from the modem during that time.
|
|
profile
|
|
|
|
profiles
|
|
This avoids compiler warnings when using -Wmaybe-uninitialized
Closes: #653
|
|
mm_iface_modem_3gpp_profile_manager_set_profile() was changed so that
the input profile object was not touched, and instead a copy of the
same would be used within the method.
Unfortunately, that change missed the update of the IP type
normalization step, which would end up modifying the original settings
instead of the newly created copy.
Fixes 7464940971ded3d550217872b42fef9f3120b1bf
|
|
If check_support functions are not defined when implementing
iface-modem-3gpp-profile-manager, set "profile-id" as default
index_field.
|
|
properties during connection
When connecting via AT commands requiring a 3gpp profile with undefined
profile-id, the corresponding bearer 3gpp profile is later modified
adding the selected PDP context.
For this reason when a next connection is requested with the same
properties (that is no profile-id) the already existing bearers is not
selected because of the different profile-id value and a new one is
created.
This change lets the connection logic use a copy of the user-requested
bearer's 3gpp profile which can be modified for the logic needs, but it
is not stored and then does not compromise a bearer comparison in a next
connection request.
|
|
'mm_3gpp_profile_list_find_best' can return an unused profile ID, which
is later tested for being already activated in
'profile_manager_check_activated_profile_ready' with +GCACT?. Since the
profile does not exist, this check always fails, but the profile manager
still tries to deactivate it, which is unnecessary.
This change checks the return error from 'check_activated_profile' and skips
SET_PROFILE_STEP_DEACTIVATE_PROFILE step if error is
MM_CORE_ERROR_NOT_FOUND.
|
|
Ussd module initialization does not work correctly because the tags match.
Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
|
|
When the user provides the profile parameter, as per the MM documentation
profile-id is an optional parameter. So with the fix the profile-id
check in input is removed. apn-type is also optional when the user
provides the settings. This check is also removed as part of the fix.
|
|
The modem may report the 'apn-type' field is the one to be used as
index; if that's the case, allow setting and deleting profiles based
on the given 'apn-type' field.
This change also makes the internal profile management operations use
one index field or another, based on what the protocol implements.
|
|
|
|
The call to g_task_return_error() takes ownership of the GError passed
to it; we must not free it ourselves upon automatic pointer cleanup.
Otherwise a crash can be triggered in the error handling path:
ModemManager[259816]: <debug> [1633088468.157848] [modem0/modemu/at] <-- '<CR><LF>OK<CR><LF>'
ModemManager[259816]: <debug> [1633088468.159832] [modem0] stored profile with id '1'
ModemManager[259816]: <debug> [1633088468.160501] [modem0] set profile state (7/8): list after
ModemManager[259816]: <debug> [1633088468.161686] [modem0/modemu/at] device open count is 3 (open)
ModemManager[259816]: <debug> [1633088468.162320] [modem0/modemu/at] device open count is 2 (close)
ModemManager[259816]: <debug> [1633088468.162746] [modem0/modemu/at] --> 'AT+CGDCONT?<CR>'
ModemManager[259816]: <debug> [1633088468.177437] [modem0/modemu/at] <-- '<CR><LF>ERROR<CR><LF>'
ModemManager[259816]: <debug> [1633088468.178011] [modem0/modemu/at] operation failure: 100 (Unknown error)
ModemManager[259816]: <warn> [1633088468.182420] [modem0/bearer0] connection attempt #1 failed: Couldn't validate update of profile '1': Unknown error
ModemManager[259816]: <info> [1633088468.193156] [modem0/bearer0] connection #1 finished: duration 0s, tx: 0 bytes, rx: 0 bytes
ModemManager[259816]: <debug> [1633088468.194280] [modem0] couldn't connect bearer: Couldn't validate update of profile '1': Unknown error
==259816== Invalid read of size 4
==259816== at 0x4FF66CF: UnknownInlinedFun (gerror.c:535)
==259816== by 0x4FF66CF: g_error_free (gerror.c:832)
==259816== by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52)
==259816== by 0x1A7F49: UnknownInlinedFun (glib-autocleanups.h:52)
==259816== by 0x1A7F49: profile_manager_get_profile_after_ready (mm-iface-modem-3gpp-profile-manager.c:140)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x1A867C: get_profile_list_ready (mm-iface-modem-3gpp-profile-manager.c:680)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x1A3DB5: internal_list_profiles_ready (mm-iface-modem-3gpp-profile-manager.c:774)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x1D7B8B: profile_manager_cgdcont_query_ready (mm-broadband-modem.c:10240)
==259816== by 0x4E1DB61: g_simple_async_result_complete (gsimpleasyncresult.c:802)
==259816== Address 0x9286da0 is 0 bytes inside a block of size 16 free'd
==259816== at 0x48440E4: free (vg_replace_malloc.c:755)
==259816== by 0x500FD1C: g_free (gmem.c:199)
==259816== by 0x502A22F: g_slice_free1 (gslice.c:1180)
==259816== by 0x4FF6780: g_error_free (gerror.c:864)
==259816== by 0x1B22D2: connect_bearer_ready (mm-iface-modem-simple.c:286)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x18031A: connect_ready (mm-base-bearer.c:917)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== by 0x4E344CA: UnknownInlinedFun (gtask.c:1289)
==259816== by 0x4E344CA: g_task_return (gtask.c:1245)
==259816== by 0x18329B: connect_3gpp_ready (mm-broadband-bearer.c:918)
==259816== by 0x4E342C9: g_task_return_now (gtask.c:1219)
==259816== Block was alloc'd at
==259816== at 0x484186F: malloc (vg_replace_malloc.c:380)
==259816== by 0x5013408: g_malloc (gmem.c:106)
==259816== by 0x502ACB4: g_slice_alloc (gslice.c:1069)
==259816== by 0x502B33D: g_slice_alloc0 (gslice.c:1095)
==259816== by 0x4FF64E6: g_error_allocate (gerror.c:702)
==259816== by 0x4FF6F03: UnknownInlinedFun (gerror.c:716)
==259816== by 0x4FF6F03: g_error_copy (gerror.c:886)
==259816== by 0x4E1D0A0: g_simple_async_result_set_from_error (gsimpleasyncresult.c:676)
==259816== by 0x236AAB: port_serial_got_response (mm-port-serial.c:744)
==259816== by 0x23B0F1: UnknownInlinedFun (mm-port-serial.c:934)
==259816== by 0x23B0F1: common_input_available (mm-port-serial.c:1035)
==259816== by 0x500AF9E: UnknownInlinedFun (gmain.c:3337)
==259816== by 0x500AF9E: g_main_context_dispatch (gmain.c:4055)
==259816== by 0x505F607: g_main_context_iterate.constprop.0 (gmain.c:4131)
==259816== by 0x500A562: g_main_loop_run (gmain.c:4329)
|
|
This interface will provide support for the profile management
operations in different modem types.
This initial commit introduces support for the interface and provides
handlers for the methods that may be called in the interface.
|