mirror of git://git.sysmocom.de/ofono
call-forwarding: Streamline set_query_cf_callback()
This commit is contained in:
parent
9d8aa928b8
commit
6356612822
|
@ -646,32 +646,29 @@ static void set_query_cf_callback(const struct ofono_error *error, int total,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
struct ofono_call_forwarding *cf = data;
|
struct ofono_call_forwarding *cf = data;
|
||||||
GSList *l;
|
|
||||||
DBusMessage *reply;
|
|
||||||
|
|
||||||
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
|
if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
|
||||||
ofono_error("Setting succeeded, but query failed");
|
ofono_error("Setting succeeded, but query failed");
|
||||||
cf->flags &= ~CALL_FORWARDING_FLAG_CACHED;
|
cf->flags &= ~CALL_FORWARDING_FLAG_CACHED;
|
||||||
reply = __ofono_error_failed(cf->pending);
|
__ofono_dbus_pending_reply(&cf->pending,
|
||||||
__ofono_dbus_pending_reply(&cf->pending, reply);
|
__ofono_error_failed(cf->pending));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cf->query_next == cf->query_end) {
|
if (cf->query_next == cf->query_end)
|
||||||
reply = dbus_message_new_method_return(cf->pending);
|
__ofono_dbus_pending_reply(&cf->pending,
|
||||||
__ofono_dbus_pending_reply(&cf->pending, reply);
|
dbus_message_new_method_return(cf->pending));
|
||||||
}
|
|
||||||
|
|
||||||
l = cf_cond_list_create(total, list);
|
set_new_cond_list(cf, cf->query_next, cf_cond_list_create(total, list));
|
||||||
set_new_cond_list(cf, cf->query_next, l);
|
|
||||||
|
|
||||||
DBG("%s conditions:", cf_type_lut[cf->query_next]);
|
DBG("%s conditions:", cf_type_lut[cf->query_next]);
|
||||||
cf_cond_list_print(l);
|
cf_cond_list_print(cf->cf_conditions[cf->query_next]);
|
||||||
|
|
||||||
if (cf->query_next != cf->query_end) {
|
if (cf->query_next == cf->query_end)
|
||||||
cf->query_next++;
|
return;
|
||||||
set_query_next_cf_cond(cf);
|
|
||||||
}
|
cf->query_next++;
|
||||||
|
set_query_next_cf_cond(cf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_query_next_cf_cond(struct ofono_call_forwarding *cf)
|
static void set_query_next_cf_cond(struct ofono_call_forwarding *cf)
|
||||||
|
|
Loading…
Reference in New Issue