diff options
Diffstat (limited to 'binding/bluetooth-pbap-binding.c')
-rw-r--r-- | binding/bluetooth-pbap-binding.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/binding/bluetooth-pbap-binding.c b/binding/bluetooth-pbap-binding.c index 1ff6e82..ccfbb7c 100644 --- a/binding/bluetooth-pbap-binding.c +++ b/binding/bluetooth-pbap-binding.c @@ -473,8 +473,15 @@ void history(afb_req_t request) if (!parse_max_entries_parameter(request, &max_entries)) return; - org_bluez_obex_phonebook_access1_call_select_sync( - phonebook, INTERNAL, list, NULL, NULL); + if (!phonebook) + return; + + if (!org_bluez_obex_phonebook_access1_call_select_sync( + phonebook, INTERNAL, COMBINED, NULL, NULL)) { + afb_req_fail(request, "cannot import call history", NULL); + return; + } + jresp = get_vcards(max_entries); afb_req_success(request, jresp, "call history"); |