mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Reject AVDTP_DISCOVER when there are no SEPs available
This commit is contained in:
parent
23f3293d30
commit
e297183416
@ -1152,6 +1152,13 @@ static gboolean avdtp_discover_cmd(struct avdtp *session, uint8_t transaction,
|
||||
gboolean ret;
|
||||
|
||||
sep_count = g_slist_length(session->server->seps);
|
||||
|
||||
if (sep_count == 0) {
|
||||
uint8_t err = AVDTP_NOT_SUPPORTED_COMMAND;
|
||||
return avdtp_send(session, transaction, AVDTP_MSG_TYPE_REJECT,
|
||||
AVDTP_DISCOVER, &err, sizeof(err));
|
||||
}
|
||||
|
||||
rsp_size = sep_count * sizeof(struct seid_info);
|
||||
|
||||
seps = g_new0(struct seid_info, sep_count);
|
||||
|
Loading…
Reference in New Issue
Block a user