diff options
author | Jaganath Kanakkassery <jaganath.k@samsung.com> | 2014-11-24 17:41:39 +0530 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-11-26 11:32:52 +0200 |
commit | e8907bccd47b56da0dcdecb51fc6f8e9a8faff07 (patch) | |
tree | 3625a1b8f4073f862d5212e414392edef59c593a /src/profile.c | |
parent | 54eea0c0974e10f04a4339947e8375653a1b4cb1 (diff) | |
download | bluez-e8907bccd47b56da0dcdecb51fc6f8e9a8faff07.tar.gz |
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
Diffstat (limited to 'src/profile.c')
-rw-r--r-- | src/profile.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } |