Bluetooth: Audio: Media - search to not modify parameter
Update the search parser to not modify the supplied parameter. This will allow the parameter to be made 'const'. Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This commit is contained in:
parent
1d66729a0a
commit
ebaad4501c
1 changed files with 28 additions and 27 deletions
|
@ -2614,9 +2614,9 @@ static void parse_search(struct mpl_search search)
|
|||
bool search_failed = false;
|
||||
|
||||
if (search.len > SEARCH_LEN_MAX) {
|
||||
BT_WARN("Search too long (%d) - truncating", search.len);
|
||||
search.len = SEARCH_LEN_MAX;
|
||||
}
|
||||
BT_WARN("Search too long (%d) - aborting", search.len);
|
||||
search_failed = true;
|
||||
} else {
|
||||
BT_DBG("Parsing %d octets search", search.len);
|
||||
|
||||
while (search.len - index > 0) {
|
||||
|
@ -2644,6 +2644,7 @@ static void parse_search(struct mpl_search search)
|
|||
BT_HEXDUMP_DBG(sci.param, sci.len-1, "param:");
|
||||
sci_num++;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Add real search functionality. */
|
||||
/* For now, just fake it. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue