diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2009-07-18 01:45:22 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-07-17 23:48:29 -0500 |
commit | 35c48071f8f26ab0af1b6a2cbf154b41a6819067 (patch) | |
tree | e953c7cb095c0024e498c507e9c5d7f27a126fcf /src/network.c | |
parent | a5bcab75649409fc91a3e9835a8f91382d845431 (diff) | |
download | ofono-35c48071f8f26ab0af1b6a2cbf154b41a6819067.tar.bz2 |
Use registration status constants consistently.
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network.c b/src/network.c index d3806083..e264374d 100644 --- a/src/network.c +++ b/src/network.c @@ -954,7 +954,8 @@ void ofono_network_registration_notify(struct ofono_modem *modem, int status, if (netreg->technology != tech) set_registration_technology(modem, tech); - if (netreg->status == 1 || netreg->status == 5) { + if (netreg->status == NETWORK_REGISTRATION_STATUS_REGISTERED || + netreg->status == NETWORK_REGISTRATION_STATUS_ROAMING) { if (netreg->ops->current_operator) netreg->ops->current_operator(modem, current_operator_callback, modem); @@ -1142,13 +1143,16 @@ static void init_registration_status(const struct ofono_error *error, /* Bootstrap our signal strength value without waiting for the * stack to report it */ - if (netreg->status == 1 || netreg->status == 5) { + if (netreg->status == NETWORK_REGISTRATION_STATUS_REGISTERED || + netreg->status == NETWORK_REGISTRATION_STATUS_ROAMING) { if (netreg->ops->signal_strength) netreg->ops->signal_strength(modem, signal_strength_callback, modem); } - if (AUTO_REGISTER && (status == 0 || status == 3)) + if (AUTO_REGISTER && + (status == NETWORK_REGISTRATION_STATUS_NOT_REGISTERED || + status == NETWORK_REGISTRATION_STATUS_DENIED)) netreg->ops->register_auto(modem, register_callback, modem); } |