aboutsummaryrefslogtreecommitdiff
path: root/src/mm-error-helpers.c
AgeCommit message (Collapse)Author
2025-03-11treewide: Fix typosGuido Günther
Signed-off-by: Guido Günther <agx@sigxcpu.org>
2023-10-27core: ensure all errors returned in DBus operations are normalizedAleksander Morgado
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.
2023-10-27api,errors: new MMCarrierLockError typeAleksander Morgado
This new error type will be used to report errors in the carrier lock operations performed through ModemManager. They have a one to one mapping to the MBIM status specific errors.
2023-10-26modem-helpers-qmi: register QMI error translationsAleksander Morgado
We register translations for QMI core and QMI protocol errors. These translations are a best-effort, and they are not meant to be exhaustive. The original error description is included in the translated GError, so that the details of the issue are not lost.
2023-10-26modem-helpers-mbim: register MBIM error translationsAleksander Morgado
We register translations for MBIM core, MBIM protocol and MBIM status errors. These translations are a best-effort, and they are not meant to be exhaustive. The original error description is included in the translated GError, so that the details of the issue are not lost.
2023-10-26error-helpers: allow registering error mappingsAleksander Morgado
E.g. from QMI/MBIM errors into MM errors.
2023-10-26core,error-helpers: new method to normalize GErrorsAleksander Morgado
The ModemManager API should not expose or return error types out of the error domains it supports. Default to a generic core error "Failed", while keeping the original error description.
2023-10-25core,error-helpers: fix formatting in ME error stringsAleksander Morgado
2021-05-22api: update MMMobileEquipmentError enum valuesAleksander Morgado
Update the list of mobile equipment error codes according to v17.1.0 of 3GPP TS 27.007 (March 2021). A lot of the enum values that were prefixed with the 'GPRS_' keyword have now been flagged as deprecated, and a new enum name given to the corresponding value. The deprecated symbol names are kept in the compat support to avoid breaking API/ABI.
2021-05-22core: improve error helpersAleksander Morgado
First, simplify the logic that attempts to find the correct error code associated to an error text string. This logic is very flaky, as it relies on knowing what the modems report as text string for the different error codes, and obviously that is not always the same. Instead of supporting all error codes in this logic, we now limit them to a small subset with common error codes and hopefully common error strings. Second, in order to quickly get the error description string for a given error code, we rework the array of supported errors so that the index of the array is the error code itself. For mobile equipment errors the logic is straightforward, as they're always in the [0,255] range, but for the message errors we create an array where the index of the array is equal to the code plus 300 as they're always in the [300,500] range. By doing this, we avoid having an array with 300 NULL items before the actual values we want to support.
2020-04-08error-helpers: port to use object loggingAleksander Morgado
2019-12-17core,error-helpers: add missing ME error codesAleksander Morgado
2016-08-15core: use MM-specific logging methods always instead of the generic GLib onesAleksander Morgado
2013-09-11error-helpers: don't warn when unknown errors are foundAleksander Morgado
Just add the messages with debug level, so that they don't get reported at syslog. Having this kind of warnings in syslog is not useful, specially because we wouldn't know which was the specific command that issued the warning. Errors due to critical issues will anyway be reported in syslog in some way or another.
2013-03-20error-helpers: avoid crash when error is not recognizedAleksander Morgado
Just remove the last element with NULL strings in the array of errors, as we're safe using G_N_ELEMENTS() to iterate it. Reported by Jose Maria Gonzalez Calabozo <jmgonzalezc@indra.es>
2012-03-15error-helpers: small refactorAleksander Morgado
2012-03-15core: start using our newly defined errorsAleksander Morgado