mirror of git://git.sysmocom.de/ofono
network: Ignore signal strength notifications if not registered
With the fix to query the signal strength when the registration status changes it should be now fine again to just ignore notifications about signal strength changes when not registered. So put this extra check and comment back into signal strenth notification function.
This commit is contained in:
parent
b7713da077
commit
8772946cfe
|
@ -1405,6 +1405,14 @@ void ofono_netreg_strength_notify(struct ofono_netreg *netreg, int strength)
|
|||
if (netreg->signal_strength == strength)
|
||||
return;
|
||||
|
||||
/*
|
||||
* Theoretically we can get signal strength even when not registered
|
||||
* to any network. However, what do we do with it in that case?
|
||||
*/
|
||||
if (netreg->status != NETWORK_REGISTRATION_STATUS_REGISTERED &&
|
||||
netreg->status != NETWORK_REGISTRATION_STATUS_ROAMING)
|
||||
return;
|
||||
|
||||
netreg->signal_strength = strength;
|
||||
|
||||
if (strength != -1) {
|
||||
|
|
Loading…
Reference in New Issue