mirror of git://git.sysmocom.de/ofono
No need to use g_timeout_add here
This commit is contained in:
parent
6b9d8567b4
commit
d7a5e7d017
|
@ -53,9 +53,9 @@ struct call_forwarding_data {
|
|||
struct cf_ss_request *ss_req;
|
||||
};
|
||||
|
||||
static gboolean get_query_next_cf_cond(gpointer user);
|
||||
static gboolean set_query_next_cf_cond(gpointer user);
|
||||
static gboolean ss_set_query_next_cf_cond(gpointer user);
|
||||
static void get_query_next_cf_cond(struct ofono_modem *modem);
|
||||
static void set_query_next_cf_cond(struct ofono_modem *modem);
|
||||
static void ss_set_query_next_cf_cond(struct ofono_modem *modem);
|
||||
static void cf_unregister_ss_controls(struct ofono_modem *modem);
|
||||
|
||||
struct cf_ss_request {
|
||||
|
@ -423,18 +423,15 @@ static void get_query_cf_callback(const struct ofono_error *error, int total,
|
|||
}
|
||||
|
||||
cf->query_next++;
|
||||
g_timeout_add(0, get_query_next_cf_cond, modem);
|
||||
get_query_next_cf_cond(modem);
|
||||
}
|
||||
|
||||
static gboolean get_query_next_cf_cond(gpointer user)
|
||||
static void get_query_next_cf_cond(struct ofono_modem *modem)
|
||||
{
|
||||
struct ofono_modem *modem = user;
|
||||
struct call_forwarding_data *cf = modem->call_forwarding;
|
||||
|
||||
cf->ops->query(modem, cf->query_next, BEARER_CLASS_DEFAULT,
|
||||
get_query_cf_callback, modem);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static DBusMessage *cf_get_properties(DBusConnection *conn, DBusMessage *msg,
|
||||
|
@ -534,27 +531,26 @@ static void set_query_cf_callback(const struct ofono_error *error, int total,
|
|||
if (cf->query_next == cf->query_end) {
|
||||
reply = dbus_message_new_method_return(cf->pending);
|
||||
__ofono_dbus_pending_reply(&cf->pending, reply);
|
||||
} else {
|
||||
cf->query_next++;
|
||||
g_timeout_add(0, set_query_next_cf_cond, modem);
|
||||
}
|
||||
}
|
||||
|
||||
l = cf_cond_list_create(total, list);
|
||||
set_new_cond_list(modem, cf->query_next, l);
|
||||
|
||||
ofono_debug("%s conditions:", cf_type_lut[cf->query_next]);
|
||||
cf_cond_list_print(l);
|
||||
|
||||
if (cf->query_next != cf->query_end) {
|
||||
cf->query_next++;
|
||||
set_query_next_cf_cond(modem);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean set_query_next_cf_cond(gpointer user)
|
||||
static void set_query_next_cf_cond(struct ofono_modem *modem)
|
||||
{
|
||||
struct ofono_modem *modem = user;
|
||||
struct call_forwarding_data *cf = modem->call_forwarding;
|
||||
|
||||
cf->ops->query(modem, cf->query_next, BEARER_CLASS_DEFAULT,
|
||||
set_query_cf_callback, modem);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void set_property_callback(const struct ofono_error *error, void *data)
|
||||
|
@ -877,23 +873,22 @@ static void ss_set_query_cf_callback(const struct ofono_error *error, int total,
|
|||
__ofono_dbus_pending_reply(&cf->pending, reply);
|
||||
g_free(cf->ss_req);
|
||||
cf->ss_req = NULL;
|
||||
} else {
|
||||
cf->query_next++;
|
||||
g_timeout_add(0, ss_set_query_next_cf_cond, modem);
|
||||
}
|
||||
|
||||
set_new_cond_list(modem, cf->query_next, l);
|
||||
|
||||
if (cf->query_next != cf->query_end) {
|
||||
cf->query_next++;
|
||||
ss_set_query_next_cf_cond(modem);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean ss_set_query_next_cf_cond(gpointer user)
|
||||
static void ss_set_query_next_cf_cond(struct ofono_modem *modem)
|
||||
{
|
||||
struct ofono_modem *modem = user;
|
||||
struct call_forwarding_data *cf = modem->call_forwarding;
|
||||
|
||||
cf->ops->query(modem, cf->query_next, BEARER_CLASS_DEFAULT,
|
||||
ss_set_query_cf_callback, modem);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void cf_ss_control_callback(const struct ofono_error *error, void *data)
|
||||
|
|
Loading…
Reference in New Issue