mirror of git://git.sysmocom.de/ofono
network: Force auto-only mode if manual registration is not supported
If the network registration driver decides to not provide a manual registration method, then force the mode to auto-only.
This commit is contained in:
parent
c9632f9817
commit
a159a0f9fc
|
@ -1483,6 +1483,12 @@ static void init_registration_status(const struct ofono_error *error,
|
|||
netreg);
|
||||
}
|
||||
|
||||
if (netreg->driver->register_manual == NULL) {
|
||||
set_registration_mode(netreg,
|
||||
NETWORK_REGISTRATION_MODE_AUTO_ONLY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (netreg->sim_context) {
|
||||
ofono_sim_read(netreg->sim_context, SIM_EF_CPHS_CSP_FILEID,
|
||||
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
|
||||
|
@ -1924,6 +1930,9 @@ static void netreg_load_settings(struct ofono_netreg *netreg)
|
|||
char *strmode;
|
||||
gboolean upgrade = FALSE;
|
||||
|
||||
if (netreg->mode == NETWORK_REGISTRATION_MODE_AUTO_ONLY)
|
||||
return;
|
||||
|
||||
imsi = ofono_sim_get_imsi(netreg->sim);
|
||||
if (imsi == NULL)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue