diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-06-07 11:22:13 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-06-07 12:57:46 -0500 |
commit | 3d96880f4110a356af0bf6d9b4e99468dc46754f (patch) | |
tree | ef6d7354441e01039add6fe175b91cdd299dd0e4 /src | |
parent | ee3343f81b03efa387c7feee1a109d49b3ebf66d (diff) | |
download | ofono-3d96880f4110a356af0bf6d9b4e99468dc46754f.tar.bz2 |
netreg: Ignore operator info when not registered
Sometimes when we roam off the cell or are simply not registered, the
modem still reports a bogus operator. We explicitly ignore this
condition in the core.
Diffstat (limited to 'src')
-rw-r--r-- | src/network.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network.c b/src/network.c index 87a73e3c..1692e40a 100644 --- a/src/network.c +++ b/src/network.c @@ -1220,6 +1220,15 @@ static void current_operator_callback(const struct ofono_error *error, DBG("%p, %p", netreg, netreg->current_operator); + /* + * Sometimes we try to query COPS right when we roam off the cell, + * in which case the operator information frequently comes in bogus. + * We ignore it here + */ + if (netreg->status != NETWORK_REGISTRATION_STATUS_REGISTERED && + netreg->status != NETWORK_REGISTRATION_STATUS_ROAMING) + current = NULL; + if (error->type != OFONO_ERROR_TYPE_NO_ERROR) { DBG("Error during current operator"); return; |