modem-helpers-mbim: register MBIM error translations

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.
This commit is contained in:
Aleksander Morgado
2023-10-26 12:35:50 +00:00
parent 08a954a88b
commit cbb825a236
4 changed files with 98 additions and 7 deletions
+5
View File
@@ -29,6 +29,7 @@
#if defined WITH_MBIM
# include <libmbim-glib.h>
# include "mm-modem-helpers-mbim.h"
#endif
/******************************************************************************/
@@ -590,6 +591,10 @@ normalize_mapped_error (const GError *error)
DomainCodePair *output = NULL;
const gchar *input_error_type;
#if defined WITH_MBIM
mm_register_mbim_errors ();
#endif
#if defined WITH_QMI
if (error->domain == QMI_CORE_ERROR)
input_error_type = "QMI core";