cinterion: allow '*' in Prov/Cfg response
E.g. in a Cinterion PLS8-E (REVISION 04.004) to match the following line: ^SCFG: "MEopMode/Prov/Cfg","fallback*" Fix suggested by Jan Mazura. See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347
This commit is contained in:
@@ -1515,7 +1515,7 @@ mm_cinterion_provcfg_response_to_cid (const gchar *response,
|
|||||||
g_autoptr(GMatchInfo) match_info = NULL;
|
g_autoptr(GMatchInfo) match_info = NULL;
|
||||||
g_autofree gchar *mno = NULL;
|
g_autofree gchar *mno = NULL;
|
||||||
|
|
||||||
r = g_regex_new ("\\^SCFG:\\s*\"MEopMode/Prov/Cfg\",\\s*\"([0-9a-zA-Z]*)\"", 0, 0, NULL);
|
r = g_regex_new ("\\^SCFG:\\s*\"MEopMode/Prov/Cfg\",\\s*\"([0-9a-zA-Z*]*)\"", 0, 0, NULL);
|
||||||
g_assert (r != NULL);
|
g_assert (r != NULL);
|
||||||
|
|
||||||
if (!g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, error))
|
if (!g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, error))
|
||||||
|
@@ -1636,6 +1636,11 @@ static const ProvcfgResponseTest provcfg_response_tests[] = {
|
|||||||
.str = "* ^SCFG: \"MEopMode/Prov/Cfg\",\"tmode\"",
|
.str = "* ^SCFG: \"MEopMode/Prov/Cfg\",\"tmode\"",
|
||||||
.modem_family = MM_CINTERION_MODEM_FAMILY_DEFAULT,
|
.modem_family = MM_CINTERION_MODEM_FAMILY_DEFAULT,
|
||||||
.expected_cid = 2,
|
.expected_cid = 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.str = "* ^SCFG: \"MEopMode/Prov/Cfg\",\"fallback*\"",
|
||||||
|
.modem_family = MM_CINTERION_MODEM_FAMILY_DEFAULT,
|
||||||
|
.expected_cid = 1,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user