[PATCH 1/2] shared/hfp: Improve next_field() function

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

 



In HF Client case we might have "-" separator between hf data. For
example +CIND: ("signal",(0-5))
With this patch next_field() is able to skip "-" as well.
---
 src/shared/hfp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index efc981f..bc091b5 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -221,7 +221,8 @@ done:
 
 static void next_field(struct hfp_gw_result *result)
 {
-	if (result->data[result->offset] == ',')
+	if (result->data[result->offset] == ',' ||
+					result->data[result->offset] == '-')
 		result->offset++;
 }
 
-- 
1.8.4

--
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