[PATCH obexd v4 3/6] client: fix incorrect error check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>

Previous statement always returned success.
---
 client/pbap.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/pbap.c b/client/pbap.c
index 4910536..dd5642d 100644
--- a/client/pbap.c
+++ b/client/pbap.c
@@ -287,6 +287,7 @@ static gboolean pbap_setpath(struct pbap_data *pbap, const char *location,
 					const char *item, GError **err)
 {
 	char *path;
+	guint id;
 
 	path = build_phonebook_path(location, item);
 	if (path == NULL) {
@@ -300,8 +301,9 @@ static gboolean pbap_setpath(struct pbap_data *pbap, const char *location,
 		return TRUE;
 	}
 
-	obc_session_setpath(pbap->session, path, pbap_setpath_cb, pbap, err);
-	if (err != NULL) {
+	id = obc_session_setpath(pbap->session, path, pbap_setpath_cb, pbap,
+									err);
+	if (id > 0) {
 		g_free(pbap->path);
 		pbap->path = path;
 		return TRUE;
-- 
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux