Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/6] android/client: Check if hex data is present in define
@ 2014-11-20 15:34 Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 2/6] android/client: Add Android 5.0 new value verifiers for gatt client Grzegorz Kolodziejczyk
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-11-20 15:34 UTC (permalink / raw)
  To: linux-bluetooth

Each hex data argument need to be checked before parsing. It was done in
before parse argc check. Now it's integrated in GET_VERIFIER_HEX_STRING.
---
 android/client/if-gatt.c | 28 +++++++++-------------------
 1 file changed, 9 insertions(+), 19 deletions(-)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index 49ccebf..9d6fafd 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -116,9 +116,14 @@ const btgatt_interface_t *if_gatt = NULL;
 		} \
 	} while (0)
 
-#define GET_VERIFY_HEX_STRING(n, v, l) \
+#define GET_VERIFY_HEX_STRING(i, v, l) \
 	do { \
 		int ll;\
+		const char *n = argv[i]; \
+		if (argc <= i) { \
+			haltest_error("No value specified\n"); \
+			return; \
+		} \
 		if (n[0] != '0' || (n[1] != 'X' && n[1] != 'x')) { \
 			haltest_error("Value must be hex string\n"); \
 			return; \
@@ -1366,13 +1371,7 @@ static void write_characteristic_p(int argc, const char **argv)
 	}
 	write_type = atoi(argv[5]);
 
-	/* value */
-	if (argc <= 6) {
-		haltest_error("No value specified\n");
-		return;
-	}
-
-	GET_VERIFY_HEX_STRING(argv[6], value, len);
+	GET_VERIFY_HEX_STRING(6, value, len);
 
 	/* auth_req */
 	if (argc > 7)
@@ -1984,8 +1983,7 @@ static void gatts_send_indication_p(int argc, const char *argv[])
 	}
 	confirm = atoi(argv[5]);
 
-	if (argc > 6)
-		GET_VERIFY_HEX_STRING(argv[6], data, len);
+	GET_VERIFY_HEX_STRING(6, data, len);
 
 	EXEC(if_gatt->server->send_indication, server_if, attr_handle, conn_id,
 							len, confirm, data);
@@ -2013,15 +2011,7 @@ static void gatts_send_response_p(int argc, const char *argv[])
 	data.attr_value.auth_req = 0;
 	data.attr_value.len = 0;
 
-	if (argc > 7) {
-		GET_VERIFY_HEX_STRING(argv[7], data.attr_value.value,
-							data.attr_value.len);
-
-		if (data.attr_value.len == 0) {
-			haltest_error("Failed to parse response value");
-			return;
-		}
-	}
+	GET_VERIFY_HEX_STRING(7, data.attr_value.value, data.attr_value.len);
 
 	haltest_info("conn_id %d, trans_id %d, status %d", conn_id, trans_id,
 									status);
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/6] android/client: Add Android 5.0 new value verifiers for gatt client
  2014-11-20 15:34 [PATCH 1/6] android/client: Check if hex data is present in define Grzegorz Kolodziejczyk
@ 2014-11-20 15:34 ` Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 3/6] android/client: Add support for gattc scan_filter_param_setup Grzegorz Kolodziejczyk
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-11-20 15:34 UTC (permalink / raw)
  To: linux-bluetooth

---
 android/client/if-gatt.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index 9d6fafd..c412d58 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -73,6 +73,68 @@ const btgatt_interface_t *if_gatt = NULL;
 #define VERIFY_STATUS(n, v) VERIFY_INT_ARG(n, v, "No status specified\n")
 #define VERIFY_OFFSET(n, v) VERIFY_INT_ARG(n, v, "No offset specified\n")
 #define VERIFY_TEST_ARG(n, v) VERIFY_INT_ARG(n, v, "No test arg specified\n")
+#define VERIFY_ACTION(n, v) VERIFY_INT_ARG(n, v, "No action specified\n")
+#define VERIFY_FILT_TYPE(n, v) VERIFY_INT_ARG(n, v, "No filter specified\n")
+#define VERIFY_FILT_INDEX(n, v) VERIFY_INT_ARG(n, v, \
+						"No filter index specified\n")
+#define VERIFY_FEAT_SELN(n, v) VERIFY_INT_ARG(n, v, "No feat seln specified\n")
+#define VERIFY_LIST_LOGIC_TYPE(n, v) VERIFY_INT_ARG(n, v, \
+					"No list logic type specified\n")
+#define VERIFY_FILT_LOGIC_TYPE(n, v) VERIFY_INT_ARG(n, v, \
+					"No filt logic type specified\n")
+#define VERIFY_RSSI_HI_THR(n, v) VERIFY_INT_ARG(n, v, \
+					"No rssi hi threshold specified\n")
+#define VERIFY_RSSI_LOW_THR(n, v) VERIFY_INT_ARG(n, v, \
+						"No low threshold specified\n")
+#define VERIFY_DELY_MODE(n, v) VERIFY_INT_ARG(n, v, "No delay mode specified\n")
+#define VERIFY_FND_TIME(n, v) VERIFY_INT_ARG(n, v, "No found time specified\n")
+#define VERIFY_LOST_TIME(n, v) VERIFY_INT_ARG(n, v, "No lost time specified\n")
+#define VERIFY_FND_TIME_CNT(n, v) VERIFY_INT_ARG(n, v, \
+					"No found timer counter specified\n")
+#define VERIFY_COMP_ID(n, v) VERIFY_INT_ARG(n, v, "No company id specified\n")
+#define VERIFY_COMP_ID_MASK(n, v) VERIFY_INT_ARG(n, v, \
+						"No comp. id mask specified\n")
+#define VERIFY_DATA_LEN(n, v) VERIFY_INT_ARG(n, v, "No data len specified\n")
+#define VERIFY_MASK_LEN(n, v) VERIFY_INT_ARG(n, v, "No mask len specified\n")
+#define VERIFY_MIN_INTERVAL(n, v) VERIFY_INT_ARG(n, v, \
+						"No min interval specified\n")
+#define VERIFY_MAX_INTERVAL(n, v) VERIFY_INT_ARG(n, v, \
+						"No max interval specified\n")
+#define VERIFY_APPEARANCE(n, v) VERIFY_INT_ARG(n, v, "No apperance specified\n")
+#define VERIFY_MANUFACTURER_LEN(n, v) VERIFY_INT_ARG(n, v, \
+					"No manufacturer len specified\n")
+#define VERIFY_SERVICE_DATA_LEN(n, v) VERIFY_INT_ARG(n, v, \
+					"No service data len specified\n")
+#define VERIFY_SERVICE_UUID_LEN(n, v) VERIFY_INT_ARG(n, v, \
+					"No service uuid len specified\n")
+#define VERIFY_MTU(n, v) VERIFY_INT_ARG(n, v, "No mtu specified\n")
+#define VERIFY_LATENCY(n, v) VERIFY_INT_ARG(n, v, \
+						"No latency specified\n")
+#define VERIFY_TIMEOUT(n, v) VERIFY_INT_ARG(n, v, "No timeout specified\n")
+#define VERIFY_SCAN_INTERVAL(n, v) VERIFY_INT_ARG(n, v, \
+						"No scan interval specified\n")
+#define VERIFY_SCAN_WINDOW(n, v) VERIFY_INT_ARG(n, v, \
+						"No scan window specified\n")
+#define VERIFY_ADV_TYPE(n, v) VERIFY_INT_ARG(n, v, \
+					"No advertising type specified\n")
+#define VERIFY_CHNL_MAP(n, v) VERIFY_INT_ARG(n, v, \
+						"No channel map specified\n")
+#define VERIFY_TX_POWER(n, v) VERIFY_INT_ARG(n, v, \
+						"No tx power specified\n")
+#define VERIFY_TIMEOUT_S(n, v) VERIFY_INT_ARG(n, v, \
+						"No timeout in sec specified\n")
+#define VERIFY_BATCH_SCAN_FULL_MAX(n, v) VERIFY_INT_ARG(n, v, \
+					"No batch scan full max specified\n")
+#define VERIFY_BATCH_SCAN_TRUNC_MAX(n, v) VERIFY_INT_ARG(n, v, \
+					"No batch scan trunc max specified\n")
+#define VERIFY_BATCH_SCAN_NOTIFY_THR(n, v) VERIFY_INT_ARG(n, v, \
+				"No batch scan notify threshold specified\n")
+#define VERIFY_SCAN_MODE(n, v) VERIFY_INT_ARG(n, v, \
+						"No scan mode specified\n")
+#define VERIFY_ADDR_TYPE(n, v) VERIFY_INT_ARG(n, v, \
+						"No address type specified\n")
+#define VERIFY_DISCARD_RULE(n, v) VERIFY_INT_ARG(n, v, \
+						"No discard rule specified\n")
 #define VERIFY_HANDLE(n, v) VERIFY_HEX_ARG(n, v, "No "#v" specified\n")
 #define VERIFY_SERVICE_HANDLE(n, v) VERIFY_HANDLE(n, v)
 
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/6] android/client: Add support for gattc scan_filter_param_setup
  2014-11-20 15:34 [PATCH 1/6] android/client: Check if hex data is present in define Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 2/6] android/client: Add Android 5.0 new value verifiers for gatt client Grzegorz Kolodziejczyk
@ 2014-11-20 15:34 ` Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 4/6] android/client: Add support for gattc scan_filter_add_remove cmd Grzegorz Kolodziejczyk
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-11-20 15:34 UTC (permalink / raw)
  To: linux-bluetooth

This is new command introduced in Android 5.0 bluetooth gatt client api.
---
 android/client/if-gatt.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index c412d58..568eba6 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -1637,6 +1637,49 @@ static void read_remote_rssi_p(int argc, const char **argv)
 	EXEC(if_gatt->client->read_remote_rssi, client_if, &bd_addr);
 }
 
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+/* scan filter parameter setup */
+static void scan_filter_param_setup_c(int argc, const char **argv,
+					enum_func *enum_func, void **user)
+{
+	if (argc == 2) {
+		*user = client_if_str;
+		*enum_func = enum_one_string;
+	}
+}
+
+static void scan_filter_param_setup_p(int argc, const char **argv)
+{
+	int client_if;
+	int action;
+	int filt_index;
+	int feat_seln;
+	int list_logic_type, filt_logic_type;
+	int rssi_high_thres, rssi_low_thres;
+	int dely_mode;
+	int found_timeout, lost_timeout, found_timeout_cnt;
+
+	RETURN_IF_NULL(if_gatt);
+	VERIFY_CLIENT_IF(2, client_if);
+	VERIFY_ACTION(3, action);
+	VERIFY_FILT_INDEX(4, filt_index);
+	VERIFY_FEAT_SELN(5, feat_seln);
+	VERIFY_LIST_LOGIC_TYPE(6, list_logic_type);
+	VERIFY_FILT_LOGIC_TYPE(7, filt_logic_type);
+	VERIFY_RSSI_HI_THR(8, rssi_high_thres);
+	VERIFY_RSSI_LOW_THR(9, rssi_low_thres);
+	VERIFY_DELY_MODE(10, dely_mode);
+	VERIFY_FND_TIME(11, found_timeout);
+	VERIFY_LOST_TIME(12, lost_timeout);
+	VERIFY_FND_TIME_CNT(13, found_timeout_cnt);
+
+	EXEC(if_gatt->client->scan_filter_param_setup, client_if, action,
+		filt_index, feat_seln, list_logic_type, filt_logic_type,
+		rssi_high_thres, rssi_low_thres, dely_mode, found_timeout,
+		lost_timeout, found_timeout_cnt);
+}
+#endif
+
 /* get_device_type */
 
 static void get_device_type_c(int argc, const char **argv, enum_func *enum_func,
@@ -1703,6 +1746,11 @@ static struct method client_methods[] = {
 #if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
 	STD_METHODCH(scan, "[1|0]"),
 	STD_METHODCH(connect, "<client_if> <addr> [<is_direct>] [<transport]"),
+	STD_METHODCH(scan_filter_param_setup, "<client_if> <action>"
+			" <filt_index> <feat_seln> <list_logic_type>"
+			" <filt_logic_type> <rssi_high_thres> <rssi_low_thres>"
+			" <dely_mode> <found_timeout> <lost_timeout>"
+			" <found_timeout_cnt>"),
 #else
 	STD_METHODCH(scan, "<client_if> [1|0]"),
 	STD_METHODCH(connect, "<client_if> <addr> [<is_direct>]"),
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/6] android/client: Add support for gattc scan_filter_add_remove cmd
  2014-11-20 15:34 [PATCH 1/6] android/client: Check if hex data is present in define Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 2/6] android/client: Add Android 5.0 new value verifiers for gatt client Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 3/6] android/client: Add support for gattc scan_filter_param_setup Grzegorz Kolodziejczyk
@ 2014-11-20 15:34 ` Grzegorz Kolodziejczyk
  2014-11-20 15:34 ` [PATCH 5/6] android/client: Add support for gattc scan_filter_clear cmd Grzegorz Kolodziejczyk
  2014-11-21 13:37 ` [PATCH 1/6] android/client: Check if hex data is present in define Szymon Janc
  4 siblings, 0 replies; 6+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-11-20 15:34 UTC (permalink / raw)
  To: linux-bluetooth

---
 android/client/if-gatt.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index 568eba6..4c9dcfa 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -1678,6 +1678,67 @@ static void scan_filter_param_setup_p(int argc, const char **argv)
 		rssi_high_thres, rssi_low_thres, dely_mode, found_timeout,
 		lost_timeout, found_timeout_cnt);
 }
+
+/* scan filter add remove */
+
+static void scan_filter_add_remove_c(int argc, const char **argv,
+					enum_func *enum_func, void **user)
+{
+	if (argc == 2) {
+		*user = client_if_str;
+		*enum_func = enum_one_string;
+	} else if (argc == 10) {
+		*user = last_addr;
+		*enum_func = enum_one_string;
+	}
+}
+
+static void scan_filter_add_remove_p(int argc, const char **argv)
+{
+	int client_if;
+	int action;
+	int filt_type;
+	int filt_index;
+	int company_id;
+	int company_id_mask;
+	bt_uuid_t p_uuid;
+	bt_uuid_t p_uuid_mask;
+	bt_bdaddr_t bd_addr;
+	char addr_type;
+	int data_len;
+	uint8_t p_data[100];
+	int mask_len;
+	uint8_t p_mask[100];
+
+	RETURN_IF_NULL(if_gatt);
+	VERIFY_CLIENT_IF(2, client_if);
+	VERIFY_ACTION(3, action);
+	VERIFY_FILT_TYPE(4, filt_type);
+	VERIFY_FILT_INDEX(5, filt_index);
+	VERIFY_COMP_ID(6, company_id);
+	VERIFY_COMP_ID_MASK(7, company_id_mask);
+
+	if (argc <= 9) {
+		haltest_error("No p_uuid, p_uuid_mask specified\n");
+		return;
+	}
+	gatt_str2bt_uuid_t(argv[8], -1, &p_uuid);
+	gatt_str2bt_uuid_t(argv[9], -1, &p_uuid_mask);
+
+	VERIFY_UUID(8, &p_uuid);
+	VERIFY_UUID(9, &p_uuid_mask);
+	VERIFY_ADDR_ARG(10, &bd_addr);
+	VERIFY_ADDR_TYPE(11, addr_type);
+	VERIFY_DATA_LEN(12, data_len);
+	GET_VERIFY_HEX_STRING(13, p_data, data_len);
+	VERIFY_MASK_LEN(14, mask_len);
+	GET_VERIFY_HEX_STRING(15, p_mask, mask_len);
+
+	EXEC(if_gatt->client->scan_filter_add_remove, client_if, action,
+		filt_type, filt_index, company_id, company_id_mask,
+		&p_uuid, &p_uuid_mask, &bd_addr, addr_type, data_len,
+		(char *) p_data, mask_len, (char *) p_mask);
+}
 #endif
 
 /* get_device_type */
@@ -1751,6 +1812,10 @@ static struct method client_methods[] = {
 			" <filt_logic_type> <rssi_high_thres> <rssi_low_thres>"
 			" <dely_mode> <found_timeout> <lost_timeout>"
 			" <found_timeout_cnt>"),
+	STD_METHODCH(scan_filter_add_remove, "<client_if> <action> <filt_type>"
+			" <filt_index> <company_id> <company_id_mask>"
+			" [<p_uuid>] <p_uuid_mask> <addr> <addr_type>"
+			" <data_len> [<p_data>] <mask_len> [<p_mask>]"),
 #else
 	STD_METHODCH(scan, "<client_if> [1|0]"),
 	STD_METHODCH(connect, "<client_if> <addr> [<is_direct>]"),
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/6] android/client: Add support for gattc scan_filter_clear cmd
  2014-11-20 15:34 [PATCH 1/6] android/client: Check if hex data is present in define Grzegorz Kolodziejczyk
                   ` (2 preceding siblings ...)
  2014-11-20 15:34 ` [PATCH 4/6] android/client: Add support for gattc scan_filter_add_remove cmd Grzegorz Kolodziejczyk
@ 2014-11-20 15:34 ` Grzegorz Kolodziejczyk
  2014-11-21 13:37 ` [PATCH 1/6] android/client: Check if hex data is present in define Szymon Janc
  4 siblings, 0 replies; 6+ messages in thread
From: Grzegorz Kolodziejczyk @ 2014-11-20 15:34 UTC (permalink / raw)
  To: linux-bluetooth

---
 android/client/if-gatt.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index 4c9dcfa..c06a1a5 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -1739,6 +1739,28 @@ static void scan_filter_add_remove_p(int argc, const char **argv)
 		&p_uuid, &p_uuid_mask, &bd_addr, addr_type, data_len,
 		(char *) p_data, mask_len, (char *) p_mask);
 }
+
+/* scan filter clean */
+static void scan_filter_clear_c(int argc, const char **argv,
+					enum_func *enum_func, void **user)
+{
+	if (argc == 2) {
+		*user = client_if_str;
+		*enum_func = enum_one_string;
+	}
+}
+
+static void scan_filter_clear_p(int argc, const char **argv)
+{
+	int client_if;
+	int filt_index;
+
+	RETURN_IF_NULL(if_gatt);
+	VERIFY_CLIENT_IF(2, client_if);
+	VERIFY_FILT_INDEX(3, filt_index);
+
+	EXEC(if_gatt->client->scan_filter_clear, client_if, filt_index);
+}
 #endif
 
 /* get_device_type */
@@ -1816,6 +1838,7 @@ static struct method client_methods[] = {
 			" <filt_index> <company_id> <company_id_mask>"
 			" [<p_uuid>] <p_uuid_mask> <addr> <addr_type>"
 			" <data_len> [<p_data>] <mask_len> [<p_mask>]"),
+	STD_METHODCH(scan_filter_clear, "<client_if> <filt_index>"),
 #else
 	STD_METHODCH(scan, "<client_if> [1|0]"),
 	STD_METHODCH(connect, "<client_if> <addr> [<is_direct>]"),
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/6] android/client: Check if hex data is present in define
  2014-11-20 15:34 [PATCH 1/6] android/client: Check if hex data is present in define Grzegorz Kolodziejczyk
                   ` (3 preceding siblings ...)
  2014-11-20 15:34 ` [PATCH 5/6] android/client: Add support for gattc scan_filter_clear cmd Grzegorz Kolodziejczyk
@ 2014-11-21 13:37 ` Szymon Janc
  4 siblings, 0 replies; 6+ messages in thread
From: Szymon Janc @ 2014-11-21 13:37 UTC (permalink / raw)
  To: Grzegorz Kolodziejczyk; +Cc: linux-bluetooth

Hi Grzegorz,

On Thursday 20 of November 2014 16:34:01 Grzegorz Kolodziejczyk wrote:
> Each hex data argument need to be checked before parsing. It was done in
> before parse argc check. Now it's integrated in GET_VERIFIER_HEX_STRING.
> ---
>  android/client/if-gatt.c | 28 +++++++++-------------------
>  1 file changed, 9 insertions(+), 19 deletions(-)
> 
> diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
> index 49ccebf..9d6fafd 100644
> --- a/android/client/if-gatt.c
> +++ b/android/client/if-gatt.c
> @@ -116,9 +116,14 @@ const btgatt_interface_t *if_gatt = NULL;
>  		} \
>  	} while (0)
>  
> -#define GET_VERIFY_HEX_STRING(n, v, l) \
> +#define GET_VERIFY_HEX_STRING(i, v, l) \
>  	do { \
>  		int ll;\
> +		const char *n = argv[i]; \
> +		if (argc <= i) { \
> +			haltest_error("No value specified\n"); \
> +			return; \
> +		} \
>  		if (n[0] != '0' || (n[1] != 'X' && n[1] != 'x')) { \
>  			haltest_error("Value must be hex string\n"); \
>  			return; \
> @@ -1366,13 +1371,7 @@ static void write_characteristic_p(int argc, const char **argv)
>  	}
>  	write_type = atoi(argv[5]);
>  
> -	/* value */
> -	if (argc <= 6) {
> -		haltest_error("No value specified\n");
> -		return;
> -	}
> -
> -	GET_VERIFY_HEX_STRING(argv[6], value, len);
> +	GET_VERIFY_HEX_STRING(6, value, len);
>  
>  	/* auth_req */
>  	if (argc > 7)
> @@ -1984,8 +1983,7 @@ static void gatts_send_indication_p(int argc, const char *argv[])
>  	}
>  	confirm = atoi(argv[5]);
>  
> -	if (argc > 6)
> -		GET_VERIFY_HEX_STRING(argv[6], data, len);
> +	GET_VERIFY_HEX_STRING(6, data, len);
>  
>  	EXEC(if_gatt->server->send_indication, server_if, attr_handle, conn_id,
>  							len, confirm, data);
> @@ -2013,15 +2011,7 @@ static void gatts_send_response_p(int argc, const char *argv[])
>  	data.attr_value.auth_req = 0;
>  	data.attr_value.len = 0;
>  
> -	if (argc > 7) {
> -		GET_VERIFY_HEX_STRING(argv[7], data.attr_value.value,
> -							data.attr_value.len);
> -
> -		if (data.attr_value.len == 0) {
> -			haltest_error("Failed to parse response value");
> -			return;
> -		}
> -	}
> +	GET_VERIFY_HEX_STRING(7, data.attr_value.value, data.attr_value.len);
>  
>  	haltest_info("conn_id %d, trans_id %d, status %d", conn_id, trans_id,
>  									status);
> 

All six patches applied, thanks.

-- 
Best regards, 
Szymon Janc

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-21 13:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20 15:34 [PATCH 1/6] android/client: Check if hex data is present in define Grzegorz Kolodziejczyk
2014-11-20 15:34 ` [PATCH 2/6] android/client: Add Android 5.0 new value verifiers for gatt client Grzegorz Kolodziejczyk
2014-11-20 15:34 ` [PATCH 3/6] android/client: Add support for gattc scan_filter_param_setup Grzegorz Kolodziejczyk
2014-11-20 15:34 ` [PATCH 4/6] android/client: Add support for gattc scan_filter_add_remove cmd Grzegorz Kolodziejczyk
2014-11-20 15:34 ` [PATCH 5/6] android/client: Add support for gattc scan_filter_clear cmd Grzegorz Kolodziejczyk
2014-11-21 13:37 ` [PATCH 1/6] android/client: Check if hex data is present in define Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox