mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
backend-native: Update all CIND indicators
When `indicator` is initialized to `1`: - it always succeeds the `indicator == CIND_CALL_INDICATOR` check; - hence always calls `continue`; - hence never reaches the end of the `while` loop where `indicator++` is called; - hence `indicator` never contains any other value than `1` meaning `cind_enabled_indicators` is ever updated. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/740>
This commit is contained in:
parent
6ec084e2b3
commit
518ca03019
1 changed files with 1 additions and 4 deletions
|
|
@ -637,9 +637,8 @@ static bool hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, const char *buf
|
|||
return true;
|
||||
} else if (sscanf(buf, "AT+BIA=%s", str) == 1) {
|
||||
/* Indicators start with index 1 and follow the order of the AT+CIND=? response */
|
||||
indicator = 1;
|
||||
|
||||
while ((r = pa_split_in_place(str, ",", &len, &state))) {
|
||||
for (indicator = 1; (r = pa_split_in_place(str, ",", &len, &state)); indicator++) {
|
||||
/* Ignore updates to mandatory indicators which are always ON */
|
||||
if (indicator == CIND_CALL_INDICATOR
|
||||
|| indicator == CIND_CALL_SETUP_INDICATOR
|
||||
|
|
@ -659,8 +658,6 @@ static bool hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, const char *buf
|
|||
rfcomm_write_response(fd, "ERROR");
|
||||
return false;
|
||||
}
|
||||
|
||||
indicator++;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue