handsfree: Reflow logic

This commit is contained in:
Denis Kenzior 2014-04-10 09:36:11 -05:00
parent 02138901d3
commit ca3ae87d0a
1 changed files with 8 additions and 7 deletions

View File

@ -298,17 +298,18 @@ out:
static void query_cnum(struct ofono_handsfree *hf)
{
if (hf->driver->cnum_query == NULL) {
if (hf->pending) {
DBusMessage *reply =
generate_get_properties_reply(hf, hf->pending);
__ofono_dbus_pending_reply(&hf->pending, reply);
}
DBusMessage *reply;
if (hf->driver->cnum_query != NULL) {
hf->driver->cnum_query(hf, hf_cnum_callback, hf);
return;
}
hf->driver->cnum_query(hf, hf_cnum_callback, hf);
if (hf->pending == NULL)
return;
reply = generate_get_properties_reply(hf, hf->pending);
__ofono_dbus_pending_reply(&hf->pending, reply);
}
static DBusMessage *handsfree_get_properties(DBusConnection *conn,