summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2012-08-28 15:33:16 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2012-08-28 10:29:16 -0700
commita9b567a98da11f2c64a6e1d01b9329ed89217b95 (patch)
tree68ad9de69dd5e60dd1a130b4955925ed403f8b94 /lib
parent0dc3e3e3e6e364cc449954e42ce16a769a55cb73 (diff)
downloadbluez-a9b567a98da11f2c64a6e1d01b9329ed89217b95.tar.gz
sdp: Fix error reporting in sdp_service_search_attr_req
This function reports error code via errno not return value.
Diffstat (limited to 'lib')
-rw-r--r--lib/sdp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sdp.c b/lib/sdp.c
index 9807c8d97..36b4d08da 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -4346,7 +4346,8 @@ int sdp_service_search_attr_req(sdp_session_t *session, const sdp_list_t *search
seqlen = gen_attridseq_pdu(pdata, attrids,
reqtype == SDP_ATTR_REQ_INDIVIDUAL ? SDP_UINT16 : SDP_UINT32);
if (seqlen == -1) {
- status = EINVAL;
+ errno = EINVAL;
+ status = -1;
goto end;
}
pdata += seqlen;