From e8907bccd47b56da0dcdecb51fc6f8e9a8faff07 Mon Sep 17 00:00:00 2001 From: Jaganath Kanakkassery Date: Mon, 24 Nov 2014 17:41:39 +0530 Subject: [PATCH] core: Fix error not returned if service is not supported Without this patch, error will not be returned if remote device does not support the service and hence application will never get any response for the connect request --- src/profile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/profile.c b/src/profile.c index 6e272c429..637ff7130 100644 --- a/src/profile.c +++ b/src/profile.c @@ -1546,6 +1546,7 @@ static void record_cb(sdp_list_t *recs, int err, gpointer user_data) if (!recs || !recs->data) { error("No SDP records found for %s", ext->name); + err = -ENOTSUP; goto failed; } @@ -1557,6 +1558,7 @@ static void record_cb(sdp_list_t *recs, int err, gpointer user_data) if (sdp_get_access_protos(rec, &protos) < 0) { error("Unable to get proto list from %s record", ext->name); + err = -ENOTSUP; goto failed; } @@ -1585,6 +1587,7 @@ static void record_cb(sdp_list_t *recs, int err, gpointer user_data) if (!conn->chan && !conn->psm) { error("Failed to find L2CAP PSM or RFCOMM channel for %s", ext->name); + err = -ENOTSUP; goto failed; } -- 2.47.3