From aae5348e9d374dab9309e47d43b528b48fd96bdd Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Fri, 17 Feb 2012 13:55:33 +0100 Subject: [PATCH] obexd: fix incorrect error check Previous statement always returned success. --- obexd/client/pbap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c index 49105368c..dd5642d36 100644 --- a/obexd/client/pbap.c +++ b/obexd/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; -- 2.47.3