[PATCH 2/3] shared/hfp: Fix calling io read function directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



can_read_data function should by called only from IO read callback.
can_read_data feeds ringbuffer but don't call process_input() if
there is pending result. So it is enought to just call process_input
cause any pending data are already present in ring_buffer.

This fix blocking read in unit/test-hfp exposed by previous patch.
---
 src/shared/hfp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index ea6494d..90e17c7 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -762,7 +762,7 @@ bool hfp_gw_send_result(struct hfp_gw *hfp, enum hfp_result result)
 	 */
 	if (hfp->result_pending) {
 		hfp->result_pending = false;
-		can_read_data(hfp->io, hfp);
+		process_input(hfp);
 	}
 
 	return true;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux