summaryrefslogtreecommitdiffstats
path: root/src/call-forwarding.c
diff options
context:
space:
mode:
authorOleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>2012-04-10 15:17:27 +0300
committerDenis Kenzior <denkenz@gmail.com>2012-04-23 15:35:22 -0500
commit9d8aa928b8981caafa395bc219327156fb747580 (patch)
treef3d274931ad483fd1ebd582380abd153a562e960 /src/call-forwarding.c
parentd797a868c058e03c016f4eb517ead0f47abbf44c (diff)
downloadofono-9d8aa928b8981caafa395bc219327156fb747580.tar.bz2
call-forwarding: Refactor cf_find_unconditional()
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r--src/call-forwarding.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index 2a7bff05..0bf406af 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -197,26 +197,12 @@ static void sim_cphs_cff_update_cb(int ok, void *data)
ofono_info("Failed to update EFcphs-cff");
}
-static struct ofono_call_forwarding_condition *cf_find_unconditional(
+static inline struct ofono_call_forwarding_condition *cf_find_unconditional(
struct ofono_call_forwarding *cf)
{
- GSList *l = cf->cf_conditions[CALL_FORWARDING_TYPE_UNCONDITIONAL];
- struct ofono_call_forwarding_condition *cond;
-
- /*
- * For now we only support Voice, although Fax & all Data
- * basic services are applicable as well.
- */
- for (; l; l = l->next) {
- cond = l->data;
-
- if (cond->cls > BEARER_CLASS_VOICE)
- continue;
-
- return cond;
- }
-
- return NULL;
+ return cf_cond_find(
+ cf->cf_conditions[CALL_FORWARDING_TYPE_UNCONDITIONAL],
+ BEARER_CLASS_VOICE);
}
static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)