gsm: only use CREG responses for authoritative registration state
For now...
This commit is contained in:
@@ -1475,14 +1475,21 @@ reg_state_changed (MMSerialPort *port,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reg_status_updated (self, state, NULL)) {
|
/* Don't update reg state on CGREG responses since for many devices it's
|
||||||
/* If registration is finished (either registered or failed) but the
|
* unclear what that registration state that actually reflects. We'll
|
||||||
* registration query hasn't completed yet, just remove the timeout and
|
* take CGREG registration state into account later when we have a more
|
||||||
* let the registration query complete.
|
* consistent way of handling it.
|
||||||
*/
|
*/
|
||||||
if (priv->pending_reg_id) {
|
if (cgreg == FALSE) {
|
||||||
g_source_remove (priv->pending_reg_id);
|
if (reg_status_updated (self, state, NULL)) {
|
||||||
priv->pending_reg_id = 0;
|
/* If registration is finished (either registered or failed) but the
|
||||||
|
* registration query hasn't completed yet, just remove the timeout and
|
||||||
|
* let the registration query complete.
|
||||||
|
*/
|
||||||
|
if (priv->pending_reg_id) {
|
||||||
|
g_source_remove (priv->pending_reg_id);
|
||||||
|
priv->pending_reg_id = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user