telit: optimized supported and current band code

In place of two slightly different regexes for 2g/3g and 2g/3g/4g modems
we now use only one regex with conditional patterns for both supported
and current Bands detection.

Adding also minor fix in test code
This commit is contained in:
Carlo Lobrano
2016-10-20 12:40:04 +02:00
committed by Aleksander Morgado
parent 0bd3ca202b
commit 7078587f58
2 changed files with 5 additions and 15 deletions
@@ -117,7 +117,7 @@ typedef struct {
static BNDFlagsTest band_flag_test[] = {
{"0-3", 4, {0, 1, 2, 3} },
{"0,3", 2, {0, 3} },
{"0,2-3,5-7,9", 2, {0, 2, 3, 5, 6, 7, 9} },
{"0,2-3,5-7,9", 7, {0, 2, 3, 5, 6, 7, 9} },
{ NULL, 0, {}},
};