Bluetooth: SDP: Queue user UUID to be resolved
Makes possible to append user UUID to context to be able later iterate it on subsequent resolving process. Jira: ZEP-1112 Change-Id: I193ff1cee199045c9686dc4ca200adf19db377e4 Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
parent
4aca00220b
commit
6d89dd897e
2 changed files with 7 additions and 0 deletions
|
@ -487,6 +487,7 @@ typedef uint8_t (*bt_sdp_discover_func_t)
|
|||
|
||||
/** @brief Main user structure used in SDP discovery of remote. */
|
||||
struct bt_sdp_discover_params {
|
||||
sys_snode_t _node;
|
||||
/** UUID (service) to be discovered on remote SDP entity */
|
||||
const struct bt_uuid *uuid;
|
||||
/** Discover callback to be called on resolved SDP record */
|
||||
|
|
|
@ -63,6 +63,8 @@ NET_BUF_POOL_DEFINE(sdp_pool, CONFIG_BLUETOOTH_MAX_CONN,
|
|||
|
||||
struct bt_sdp_client {
|
||||
struct bt_l2cap_br_chan chan;
|
||||
/* list of waiting to be resolved UUID params */
|
||||
sys_slist_t reqs;
|
||||
};
|
||||
|
||||
static struct bt_sdp_client bt_sdp_client_pool[CONFIG_BLUETOOTH_MAX_CONN];
|
||||
|
@ -358,6 +360,8 @@ static struct bt_sdp_client *sdp_client_new_session(struct bt_conn *conn)
|
|||
continue;
|
||||
}
|
||||
|
||||
sys_slist_init(&session->reqs);
|
||||
|
||||
session->chan.chan.ops = &sdp_client_chan_ops;
|
||||
session->chan.chan.conn = conn;
|
||||
session->chan.rx.mtu = SDP_CLIENT_MTU;
|
||||
|
@ -404,5 +408,7 @@ int bt_sdp_discover(struct bt_conn *conn,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
sys_slist_append(&session->reqs, (sys_snode_t *)¶ms->_node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue