Diff between 88c189479f128f649d9589fc828c74452e363b6f and 3953744e51e6da0a55e4604e184a52eb1dc707b8

Changed Files

File Additions Deletions Status
src/shared/hfp.c +6 -0 modified

Full Patch

diff --git a/src/shared/hfp.c b/src/shared/hfp.c
index 9523243..1be53fb 100644
--- a/src/shared/hfp.c
+++ b/src/shared/hfp.c
@@ -374,6 +374,12 @@ static void process_input(struct hfp_gw *hfp)
 		char *str2;
 		size_t len2;
 
+		/* If there is no more data in ringbuffer,
+		 * it's just an incomplete command.
+		 */
+		if (len == ringbuf_len(hfp->read_buf))
+			return;
+
 		str2 = ringbuf_peek(hfp->read_buf, len, &len2);
 		if (!str2)
 			return;