Bluetooth: SDP: Add UUID reference to user callback

User may want to know when getting called user UUID callback handler
on what UUID the result data was retrieved from server.

Jira: ZEP-1112

Change-Id: Iabb2dbdf0f3cfdb24244e052f094c7549164b199
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-12-27 15:26:39 +01:00 committed by Johan Hedberg
commit 7ec0c37ec3
2 changed files with 6 additions and 2 deletions

View file

@ -442,9 +442,11 @@ int bt_sdp_register_service(struct bt_sdp_record *service);
/** @brief Generic SDP Client Query Result data holder */
struct bt_sdp_client_result {
/* buffer containing unparsed SDP record result for given UUID */
struct net_buf *resp_buf;
struct net_buf *resp_buf;
/* flag pointing that there are more result chunks for given UUID */
bool next_record_hint;
bool next_record_hint;
/* Reference to UUID object on behalf one discovery was started */
const struct bt_uuid *uuid;
};
/** @brief Helper enum to be used as return value of bt_sdp_discover_func_t.

View file

@ -541,6 +541,8 @@ static void sdp_client_notify_result(struct bt_sdp_client *session,
uint16_t rec_len;
uint8_t user_ret;
result.uuid = session->param->uuid;
if (state == UUID_NOT_RESOLVED) {
result.resp_buf = NULL;
result.next_record_hint = false;