obexd/irmc: Fix folder for LUID requests
PATCH 1/1 obexd/irmc: Fix folder for LUID requests
The old macro PB_LUID_FOLDER had the folder luid on the second level:
/telecom/luid. But the luid folder occurs per IrMC spec on level three e.g. /telecom/pb/luid. On the second level the object store e.g. pb is specified. This bug was introduced with commit 62ebf8d0f345e7722334d852cf7a010b202647e7.
--- obexd/plugins/irmc.c | 6 +++--- obexd/plugins/phonebook.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
obexd/plugins/irmc.c +3 -3
@@ -326,7 +326,7 @@ static int irmc_open_nt(struct irmc_session *irmc)return 0 ; } -static int irmc_open_luid (struct irmc_session *irmc) +static int irmc_open_pb_luid (struct irmc_session *irmc) {if (irmc->buffer ==NULL ) irmc->buffer =g_string_new ("" );
@@ -381,8 +381,8 @@ static void *irmc_open(const char *name, int oflag, mode_t mode, void *context, ret =irmc_open_cal (irmc); else if (g_str_has_prefix(path, PB_NOTES_FOLDER)) ret =irmc_open_nt (irmc); - else if (g_str_has_prefix(path, PB_LUID_FOLDER)) - ret =irmc_open_luid (irmc); + else if (g_str_has_prefix(path, PB_CONTACTS_LUID_FOLDER)) + ret =irmc_open_pb_luid (irmc); else ret = -EBADR ;
obexd/plugins/phonebook.h +1 -1
@@ -37,7 +37,7 @@#define PB_CALLS_INCOMING_FOLDER "/telecom/ich"#define PB_CALLS_MISSED_FOLDER "/telecom/mch"#define PB_CALLS_OUTGOING_FOLDER "/telecom/och" -#define PB_LUID_FOLDER "/telecom/luid" +#define PB_CONTACTS_LUID_FOLDER "/telecom/pb/luid"#define PB_CONTACTS "/telecom/pb.vcf"#define PB_CALLS_COMBINED "/telecom/cch.vcf"
Signature · 1 line
1.8.3.2
Luiz Augusto von Dentz
maintainerHi Harald,
Quoted 47 lines · Harald Schmitt
The old macro
PB_LUID_FOLDERhad the folder luid on the second level:
/telecom/luid. But the luid folder occurs per IrMC spec on level three e.g. /telecom/pb/luid. On the second level the object store e.g. pb is specified. This bug was introduced with commit62ebf8d0f345e7722334d852cf7a010b202647e7.--- obexd/plugins/irmc.c | 6 +++--- obexd/plugins/phonebook.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)obexd/plugins/irmc.c +3
-3@@ -326,7 +326,7 @@ static int irmc_open_nt(struct irmc_session *irmc)return 0 ; } -static int irmc_open_luid (struct irmc_session *irmc) +static int irmc_open_pb_luid (struct irmc_session *irmc) {if (irmc->buffer ==NULL ) irmc->buffer =g_string_new ("" );@@ -381,8 +381,8 @@ static void *irmc_open(const char *name, int oflag, mode_t mode, void *context, ret =irmc_open_cal (irmc); else if (g_str_has_prefix(path, PB_NOTES_FOLDER)) ret =irmc_open_nt (irmc); - else if (g_str_has_prefix(path, PB_LUID_FOLDER)) - ret =irmc_open_luid (irmc); + else if (g_str_has_prefix(path, PB_CONTACTS_LUID_FOLDER)) + ret =irmc_open_pb_luid (irmc); else ret = -EBADR ;obexd/plugins/phonebook.h +1
-2@@ -37,7 +37,7 @@#define PB_CALLS_INCOMING_FOLDER "/telecom/ich"#define PB_CALLS_MISSED_FOLDER "/telecom/mch"#define PB_CALLS_OUTGOING_FOLDER "/telecom/och" -#define PB_LUID_FOLDER "/telecom/luid" +#define PB_CONTACTS_LUID_FOLDER "/telecom/pb/luid"#define PB_CONTACTS "/telecom/pb.vcf"#define PB_CALLS_COMBINED "/telecom/cch.vcf" --
Quoted 1 line
1.8.3.2
I went ahead and pushed this one, but I preserve much of the define and function names used before since I did not see any reason to change those.
Signature · 1 line
Luiz Augusto von Dentz
Hi Luiz,
Am 20.01.2014 20:29, schrieb Luiz Augusto von Dentz:
Quoted 47 lines
Hi Harald,
Quoted 44 lines · Harald Schmitt
The old macro
PB_LUID_FOLDERhad the folder luid on the second level:
/telecom/luid. But the luid folder occurs per IrMC spec on level three e.g. /telecom/pb/luid. On the second level the object store e.g. pb is specified. This bug was introduced with commit62ebf8d0f345e7722334d852cf7a010b202647e7.--- obexd/plugins/irmc.c | 6 +++--- obexd/plugins/phonebook.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)obexd/plugins/irmc.c +3
-3@@ -326,7 +326,7 @@ static int irmc_open_nt(struct irmc_session *irmc)return 0 ; } -static int irmc_open_luid (struct irmc_session *irmc) +static int irmc_open_pb_luid (struct irmc_session *irmc) {if (irmc->buffer ==NULL ) irmc->buffer =g_string_new ("" );@@ -381,8 +381,8 @@ static void *irmc_open(const char *name, int oflag, mode_t mode, void *context, ret =irmc_open_cal (irmc); else if (g_str_has_prefix(path, PB_NOTES_FOLDER)) ret =irmc_open_nt (irmc); - else if (g_str_has_prefix(path, PB_LUID_FOLDER)) - ret =irmc_open_luid (irmc); + else if (g_str_has_prefix(path, PB_CONTACTS_LUID_FOLDER)) + ret =irmc_open_pb_luid (irmc); else ret = -EBADR ;obexd/plugins/phonebook.h +1
-1@@ -37,7 +37,7 @@#define PB_CALLS_INCOMING_FOLDER "/telecom/ich"#define PB_CALLS_MISSED_FOLDER "/telecom/mch"#define PB_CALLS_OUTGOING_FOLDER "/telecom/och" -#define PB_LUID_FOLDER "/telecom/luid" +#define PB_CONTACTS_LUID_FOLDER "/telecom/pb/luid"
Quoted 9 lines
Quoted 4 lines
obexd/plugins/phonebook.h +0
-1#define PB_CONTACTS "/telecom/pb.vcf"#define PB_CALLS_COMBINED "/telecom/cch.vcf" --1.8.3.2
I went ahead and pushed this one, but I preserve much of the define and function names used before since I did not see any reason to change those.
That's fine with me. I just thought it would be more descriptive.