mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-25 03:40:44 +01:00
keyfile: fix reading intlist-like SSIDs (ie "101") (lp:874328)
Intlists have to end with a ';' since that's how they are written out, and that's the only way we can actually distinguish between intlist SSIDs and string SSIDs, really.
This commit is contained in:
parent
65bcc4719a
commit
965d5860ab
1 changed files with 2 additions and 2 deletions
|
|
@ -743,13 +743,13 @@ get_uchar_array (GKeyFile *keyfile,
|
|||
int i;
|
||||
|
||||
/* New format: just a string
|
||||
* Old format: integer list; e.g. 11;25;38
|
||||
* Old format: integer list; e.g. 11;25;38;
|
||||
*/
|
||||
tmp_string = g_key_file_get_string (keyfile, setting_name, key, NULL);
|
||||
if (tmp_string) {
|
||||
GRegex *regex;
|
||||
GMatchInfo *match_info;
|
||||
const char *pattern = "^[[:space:]]*[[:digit:]]{1,3}[[:space:]]*(;[[:space:]]*[[:digit:]]{1,3}[[:space:]]*)*(;[[:space:]]*)?$";
|
||||
const char *pattern = "^[[:space:]]*[[:digit:]]{1,3};[[:space:]]*([[:space:]]*[[:digit:]]{1,3};[[:space:]]*)*([[:space:]]*)?$";
|
||||
|
||||
regex = g_regex_new (pattern, 0, 0, NULL);
|
||||
g_regex_match (regex, tmp_string, 0, &match_info);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue