From fdb556cb187c3a65e69e087a242db2cc421a8a63 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 4 Mar 2014 16:32:07 +0100 Subject: [PATCH] shared/hfp: Add function to check if reach end of command --- src/shared/hfp.c | 5 +++++ src/shared/hfp.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/shared/hfp.c b/src/shared/hfp.c index b10316eda..44b5b5529 100644 --- a/src/shared/hfp.c +++ b/src/shared/hfp.c @@ -336,6 +336,11 @@ bool hfp_gw_result_get_unquoted_string(struct hfp_gw_result *result, char *buf, return true; } +bool hfp_gw_result_has_next(struct hfp_gw_result *result) +{ + return result->data[result->offset] != '\0'; +} + static void process_input(struct hfp_gw *hfp) { char *str, *ptr; diff --git a/src/shared/hfp.h b/src/shared/hfp.h index 649b77e4a..4da5c97b3 100644 --- a/src/shared/hfp.h +++ b/src/shared/hfp.h @@ -120,3 +120,4 @@ bool hfp_gw_result_get_string(struct hfp_gw_result *result, char *buf, uint8_t len); bool hfp_gw_result_get_unquoted_string(struct hfp_gw_result *result, char *buf, uint8_t len); +bool hfp_gw_result_has_next(struct hfp_gw_result *result); -- 2.47.3