mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 00:38:07 +02:00
core: fix reading WWAN state from state file
This commit is contained in:
parent
58df1b6e36
commit
f9318dac55
1 changed files with 9 additions and 1 deletions
|
|
@ -334,7 +334,7 @@ parse_state_file (const char *filename,
|
|||
{
|
||||
GKeyFile *state_file;
|
||||
GError *tmp_error = NULL;
|
||||
gboolean wifi, net;
|
||||
gboolean wifi, net, wwan;
|
||||
|
||||
g_return_val_if_fail (net_enabled != NULL, FALSE);
|
||||
g_return_val_if_fail (wifi_enabled != NULL, FALSE);
|
||||
|
|
@ -411,6 +411,14 @@ parse_state_file (const char *filename,
|
|||
*wifi_enabled = wifi;
|
||||
g_clear_error (&tmp_error);
|
||||
|
||||
wwan = g_key_file_get_boolean (state_file, "main", "WWANEnabled", &tmp_error);
|
||||
if (tmp_error) {
|
||||
g_clear_error (error);
|
||||
g_set_error_literal (error, tmp_error->domain, tmp_error->code, tmp_error->message);
|
||||
} else
|
||||
*wwan_enabled = wwan;
|
||||
g_clear_error (&tmp_error);
|
||||
|
||||
g_key_file_free (state_file);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue