linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] android/client: Allow zero length responses
@ 2014-05-28  9:19 Jakub Tyszkowski
  2014-05-28  9:19 ` [PATCH 2/2] android/pts: Update GATT PTS results Jakub Tyszkowski
  2014-05-28  9:28 ` [PATCH 1/2] android/client: Allow zero length responses Szymon Janc
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-05-28  9:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

---
 android/client/if-gatt.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index 252e89d..0375126 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -1772,15 +1772,11 @@ 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) {
-		haltest_error("No data specified\n");
-		return;
-	}
-
-	data.attr_value.len = strlen(argv[7]);
-	scan_field(argv[7], data.attr_value.len, data.attr_value.value,
+	if (argc > 7) {
+		data.attr_value.len = strlen(argv[7]);
+		scan_field(argv[7], data.attr_value.len, data.attr_value.value,
 						sizeof(data.attr_value.value));
-
+	}
 
 	haltest_info("conn_id %d, trans_id %d, status %d", conn_id, trans_id,
 									status);
-- 
1.9.3


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

* [PATCH 2/2] android/pts: Update GATT PTS results
  2014-05-28  9:19 [PATCH 1/2] android/client: Allow zero length responses Jakub Tyszkowski
@ 2014-05-28  9:19 ` Jakub Tyszkowski
  2014-05-28  9:28 ` [PATCH 1/2] android/client: Allow zero length responses Szymon Janc
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-05-28  9:19 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

---
 android/pts-gatt.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/android/pts-gatt.txt b/android/pts-gatt.txt
index 6508ec1..6de65d2 100644
--- a/android/pts-gatt.txt
+++ b/android/pts-gatt.txt
@@ -227,7 +227,13 @@ TC_GAR_SR_BV_07_C	PASS	haltest:
 				gatts send_response:
 						<data> value greater than MTU
 						repeat with correct offset
-TC_GAR_SR_BV_08_C	INC
+TC_GAR_SR_BV_08_C	PASS	haltest:
+				gatts add_service
+				gatts add_chaaracteristic:
+						<properties> 2 <permissions> 1
+				gatts add_descriptor: <permissions> 1
+				gatts start_service
+				gatts send_response: repeat with correct offset
 TC_GAR_SR_BI_28_C	INC
 TC_GAR_SR_BI_29_C	PASS	haltest:
 				gatts add_service
-- 
1.9.3


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

* Re: [PATCH 1/2] android/client: Allow zero length responses
  2014-05-28  9:19 [PATCH 1/2] android/client: Allow zero length responses Jakub Tyszkowski
  2014-05-28  9:19 ` [PATCH 2/2] android/pts: Update GATT PTS results Jakub Tyszkowski
@ 2014-05-28  9:28 ` Szymon Janc
  1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2014-05-28  9:28 UTC (permalink / raw)
  To: Jakub Tyszkowski; +Cc: linux-bluetooth

Hi Jakub,

On Wednesday 28 of May 2014 11:19:06 Jakub Tyszkowski wrote:
> ---
>  android/client/if-gatt.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
> index 252e89d..0375126 100644
> --- a/android/client/if-gatt.c
> +++ b/android/client/if-gatt.c
> @@ -1772,15 +1772,11 @@ 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) {
> -		haltest_error("No data specified\n");
> -		return;
> -	}
> -
> -	data.attr_value.len = strlen(argv[7]);
> -	scan_field(argv[7], data.attr_value.len, data.attr_value.value,
> +	if (argc > 7) {
> +		data.attr_value.len = strlen(argv[7]);
> +		scan_field(argv[7], data.attr_value.len, data.attr_value.value,
>  						sizeof(data.attr_value.value));
> -
> +	}
>  
>  	haltest_info("conn_id %d, trans_id %d, status %d", conn_id, trans_id,
>  									status);

This patch is now applied, thanks.

-- 
Best regards, 
Szymon Janc

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

end of thread, other threads:[~2014-05-28  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28  9:19 [PATCH 1/2] android/client: Allow zero length responses Jakub Tyszkowski
2014-05-28  9:19 ` [PATCH 2/2] android/pts: Update GATT PTS results Jakub Tyszkowski
2014-05-28  9:28 ` [PATCH 1/2] android/client: Allow zero length responses Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).