diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index b04dca9..61e7e42 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
if (strcmp(type, PHONEBOOK_TYPE) == 0) {
/* Always contains the absolute path */
- path = g_strdup(name);
+ if (g_path_is_absolute(name))
+ path = g_strdup(name);
+ else
+ path = g_build_filename("/", name, NULL);
+
*stream = (params->maxlistcount == 0 ? FALSE : TRUE);
} else if (strcmp(type, VCARDLISTING_TYPE) == 0) {
/* Always relative */
diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c
index 28d5c7d..9963aab 100644
--- a/obexd/plugins/phonebook-tracker.c
+++ b/obexd/plugins/phonebook-tracker.c
static const char *name2query(const char *name)
{
- if (g_str_equal(name, "telecom/pb.vcf"))
+ if (g_str_equal(name, "/telecom/pb.vcf"))
return CONTACTS_QUERY_ALL;
- else if (g_str_equal(name, "telecom/ich.vcf"))
+ else if (g_str_equal(name, "/telecom/ich.vcf"))
return INCOMING_CALLS_QUERY;
- else if (g_str_equal(name, "telecom/och.vcf"))
+ else if (g_str_equal(name, "/telecom/och.vcf"))
return OUTGOING_CALLS_QUERY;
- else if (g_str_equal(name, "telecom/mch.vcf"))
+ else if (g_str_equal(name, "/telecom/mch.vcf"))
return MISSED_CALLS_QUERY;
- else if (g_str_equal(name, "telecom/cch.vcf"))
+ else if (g_str_equal(name, "/telecom/cch.vcf"))
return COMBINED_CALLS_QUERY;
return NULL;
static const char *name2count_query(const char *name)
{
- if (g_str_equal(name, "telecom/pb.vcf"))
+ if (g_str_equal(name, "/telecom/pb.vcf"))
return CONTACTS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/ich.vcf"))
+ else if (g_str_equal(name, "/telecom/ich.vcf"))
return INCOMING_CALLS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/och.vcf"))
+ else if (g_str_equal(name, "/telecom/och.vcf"))
return OUTGOING_CALLS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/mch.vcf"))
+ else if (g_str_equal(name, "/telecom/mch.vcf"))
return MISSED_CALLS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/cch.vcf"))
+ else if (g_str_equal(name, "/telecom/cch.vcf"))
return COMBINED_CALLS_COUNT_QUERY;
return NULL;
}
if (data->params->maxlistcount == 0) {
- query = name2count_query("telecom/mch.vcf");
+ query = name2count_query("/telecom/mch.vcf");
col_amount = COUNT_QUERY_COL_AMOUNT;
pull_cb = pull_contacts_size;
} else {
- query = name2query("telecom/mch.vcf");
+ query = name2query("/telecom/mch.vcf");
col_amount = PULL_QUERY_COL_AMOUNT;
pull_cb = pull_contacts;
}
if(!data)
return -ENOENT;
- if (g_strcmp0(data->req_name, "telecom/mch.vcf") == 0) {
+ if (g_strcmp0(data->req_name, "/telecom/mch.vcf") == 0) {
query = NEW_MISSED_CALLS_LIST;
col_amount = PULL_QUERY_COL_AMOUNT;
pull_cb = pull_newmissedcalls;