summaryrefslogtreecommitdiffstats
path: root/src/call-forwarding.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-03-15 21:22:35 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-03-15 21:22:35 -0500
commitc8b5143a03a4abe9e632610883ea853e7f222a7e (patch)
treecde124f8d56dab55b0076ae88179279589fccdcb /src/call-forwarding.c
parent643144aafbfc58bf61f50a0cdba054bcad465974 (diff)
downloadofono-c8b5143a03a4abe9e632610883ea853e7f222a7e.tar.bz2
call-forwarding: Don't update from sim if cached
If we have already cached the settings, then there's no need to update them from the SIM, even if a SIM refresh was performed.
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r--src/call-forwarding.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index fe535b84..1ba588a4 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -1279,6 +1279,9 @@ static void sim_cfis_read_cb(int ok, int total_length, int record,
cf->cfis_record_id = record;
+ if (cf->flags & CALL_FORWARDING_FLAG_CACHED)
+ return;
+
/*
* For now we only support Voice, although Fax & all Data
* basic services are applicable as well.
@@ -1343,6 +1346,9 @@ static void sim_cphs_cff_read_cb(int ok, int total_length, int record,
cf->flags |= CALL_FORWARDING_FLAG_CPHS_CFF;
+ if (cf->flags & CALL_FORWARDING_FLAG_CACHED)
+ return;
+
/*
* For now we only support Voice, although Fax & all Data
* basic services are applicable as well.
@@ -1362,6 +1368,9 @@ static void sim_cfis_changed(int id, void *userdata)
{
struct ofono_call_forwarding *cf = userdata;
+ if (cf->flags & CALL_FORWARDING_FLAG_CACHED)
+ goto done;
+
if (((cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) ||
cf->cfis_record_id > 0) && is_cfu_enabled(cf, NULL)) {
DBusConnection *conn = ofono_dbus_get_connection();
@@ -1374,6 +1383,7 @@ static void sim_cfis_changed(int id, void *userdata)
DBUS_TYPE_BOOLEAN, &status);
}
+done:
cf->cfis_record_id = 0;
cf->flags &= ~CALL_FORWARDING_FLAG_CPHS_CFF;