+CRSM response parser doesn't match empty string
<warn> [1641922135.360300] [modem0/sim0] couldn't load list of
emergency numbers: Failed to parse CRSM query result '+CRSM: 148,8,""'
Seems like the regex in mm_3gpp_parse_crsm_response needs some work. Here it is:
r = g_regex_new
("\\+CRSM:\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*\"?([0-9a-fA-F]+)\"?",
G_REGEX_RAW, 0, NULL);
The last +
in [0-9a-fA-F]+
means "one or more" so it won't match the empty string.
We need to see if this is somehow intended in the code (so that an error is returned for empty strings) or whether we do want to receive an empty string as result (and detect that as an error later on).
See https://lists.freedesktop.org/archives/modemmanager-devel/2022-January/009080.html