mirror of git://git.sysmocom.de/ofono
call-forwarding: Refactor cf_find_unconditional()
This commit is contained in:
parent
d797a868c0
commit
9d8aa928b8
|
@ -197,26 +197,12 @@ static void sim_cphs_cff_update_cb(int ok, void *data)
|
||||||
ofono_info("Failed to update EFcphs-cff");
|
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)
|
struct ofono_call_forwarding *cf)
|
||||||
{
|
{
|
||||||
GSList *l = cf->cf_conditions[CALL_FORWARDING_TYPE_UNCONDITIONAL];
|
return cf_cond_find(
|
||||||
struct ofono_call_forwarding_condition *cond;
|
cf->cf_conditions[CALL_FORWARDING_TYPE_UNCONDITIONAL],
|
||||||
|
BEARER_CLASS_VOICE);
|
||||||
/*
|
|
||||||
* 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)
|
static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)
|
||||||
|
|
Loading…
Reference in New Issue