mirror of git://git.sysmocom.de/ofono
radio-settings: Init pending_band_{gsm|umts}
The set_band method takes two parameters for band settings, one for gsm and one for umts. When loaded from storage, and they are not set to defaults, the band variables can get out of sync when setting the GsmBand and UmtsBand properties.
This commit is contained in:
parent
29ff4dc2e4
commit
d8b60d854c
|
@ -855,6 +855,8 @@ static void radio_load_settings(struct ofono_radio_settings *rs,
|
|||
"GsmBand", rs->band_gsm);
|
||||
}
|
||||
|
||||
rs->pending_band_gsm = rs->band_gsm;
|
||||
|
||||
error = NULL;
|
||||
rs->band_umts = g_key_file_get_integer(rs->settings, SETTINGS_GROUP,
|
||||
"UmtsBand", &error);
|
||||
|
@ -865,6 +867,8 @@ static void radio_load_settings(struct ofono_radio_settings *rs,
|
|||
"UmtsBand", rs->band_umts);
|
||||
}
|
||||
|
||||
rs->pending_band_umts = rs->band_umts;
|
||||
|
||||
error = NULL;
|
||||
rs->mode = g_key_file_get_integer(rs->settings, SETTINGS_GROUP,
|
||||
"TechnologyPreference", &error);
|
||||
|
@ -890,10 +894,8 @@ void ofono_radio_settings_register(struct ofono_radio_settings *rs)
|
|||
|
||||
radio_load_settings(rs, ofono_sim_get_imsi(sim));
|
||||
|
||||
if (rs->driver->set_band == NULL)
|
||||
goto finish;
|
||||
|
||||
rs->driver->set_band(rs, rs->band_gsm, rs->band_umts,
|
||||
if (rs->driver->set_band != NULL)
|
||||
rs->driver->set_band(rs, rs->band_gsm, rs->band_umts,
|
||||
radio_band_set_callback_at_reg, rs);
|
||||
|
||||
if (rs->driver->set_rat_mode == NULL)
|
||||
|
|
Loading…
Reference in New Issue