Skip to content

Commit 2b27b1c

Browse files
lylezhu2012kartben
authored andcommitted
Bluetooth: HFP_AG: Update SDP discovery
Add set the parameter `type` to value `BT_SDP_DISCOVER_SERVICE_SEARCH_ATTR`. Update the SDP discovery callback function by adding a third parameter `const struct bt_sdp_discover_params *params`. Make it align with `bt_sdp_discover_func_t`. Signed-off-by: Lyle Zhu <[email protected]>
1 parent d37402f commit 2b27b1c

File tree

1 file changed

+3
-1
lines changed
  • samples/bluetooth/handsfree_ag/src

1 file changed

+3
-1
lines changed

samples/bluetooth/handsfree_ag/src/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ static struct bt_hfp_ag_cb ag_cb = {
111111
.terminate = ag_terminate,
112112
};
113113

114-
static uint8_t sdp_discover_cb(struct bt_conn *conn, struct bt_sdp_client_result *result)
114+
static uint8_t sdp_discover_cb(struct bt_conn *conn, struct bt_sdp_client_result *result,
115+
const struct bt_sdp_discover_params *params)
115116
{
116117
int err;
117118
uint16_t value;
@@ -136,6 +137,7 @@ static uint8_t sdp_discover_cb(struct bt_conn *conn, struct bt_sdp_client_result
136137
}
137138

138139
static struct bt_sdp_discover_params sdp_discover = {
140+
.type = BT_SDP_DISCOVER_SERVICE_SEARCH_ATTR,
139141
.func = sdp_discover_cb,
140142
.pool = &sdp_discover_pool,
141143
.uuid = BT_UUID_DECLARE_16(BT_SDP_HANDSFREE_SVCLASS),

0 commit comments

Comments
 (0)