Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type
@ 2014-05-28  9:17 Jakub Tyszkowski
  2014-05-28  9:18 ` [PATCHv2 2/2] android/pts: Update GATT PTS results Jakub Tyszkowski
  2014-05-28  9:27 ` [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type Szymon Janc
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-05-28  9:17 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

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

diff --git a/android/gatt.c b/android/gatt.c
index 9234b46..6189407 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -3643,9 +3643,15 @@ static void send_dev_pending_response(struct gatt_device *device,
 			goto done;
 		}
 
+		if (val->error) {
+			queue_destroy(temp, NULL);
+			error = val->error;
+			goto done;
+		}
+
 		length = val->length;
 
-		while (val && val->length == length) {
+		while (val && val->length == length && val->error == 0) {
 			queue_push_tail(temp, val);
 			val = queue_pop_head(device->pending_requests);
 		}
-- 
1.9.3


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

* [PATCHv2 2/2] android/pts: Update GATT PTS results
  2014-05-28  9:17 [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type Jakub Tyszkowski
@ 2014-05-28  9:18 ` Jakub Tyszkowski
  2014-05-28  9:27 ` [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type Szymon Janc
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Tyszkowski @ 2014-05-28  9:18 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Jakub Tyszkowski

---
 android/pts-gatt.txt | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/android/pts-gatt.txt b/android/pts-gatt.txt
index b5126ee..6508ec1 100644
--- a/android/pts-gatt.txt
+++ b/android/pts-gatt.txt
@@ -149,9 +149,24 @@ TC_GAR_SR_BI_06_C	PASS	haltest:
 				gatts start_service
 TC_GAR_SR_BI_07_C	PASS
 TC_GAR_SR_BI_08_C	PASS
-TC_GAR_SR_BI_09_C	INC
-TC_GAR_SR_BI_10_C	INC
-TC_GAR_SR_BI_11_C	INC
+TC_GAR_SR_BI_09_C	PASS	haltest:
+				gatts add_service
+				gatts add_chaaracteristic:
+						<properties> 2 <permissions> 1
+				gatts start_service
+				gatts send_response: <status> 8
+TC_GAR_SR_BI_10_C	PASS	haltest:
+				gatts add_service
+				gatts add_chaaracteristic:
+						<properties> 2 <permissions> 1
+				gatts start_service
+				gatts send_response: <status> 5
+TC_GAR_SR_BI_11_C	PASS	haltest:
+				gatts add_service
+				gatts add_chaaracteristic:
+						<properties> 2 <permissions> 1
+				gatts start_service
+				gatts send_response: <status> 12
 TC_GAR_SR_BV_04_C	PASS	haltest:
 				gatts add_service
 				gatts add_chaaracteristic:
-- 
1.9.3


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

* Re: [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type
  2014-05-28  9:17 [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type Jakub Tyszkowski
  2014-05-28  9:18 ` [PATCHv2 2/2] android/pts: Update GATT PTS results Jakub Tyszkowski
@ 2014-05-28  9:27 ` Szymon Janc
  1 sibling, 0 replies; 3+ messages in thread
From: Szymon Janc @ 2014-05-28  9:27 UTC (permalink / raw)
  To: Jakub Tyszkowski; +Cc: linux-bluetooth

Hi Jakub,

On Wednesday 28 of May 2014 11:17:59 Jakub Tyszkowski wrote:
> ---
>  android/gatt.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/android/gatt.c b/android/gatt.c
> index 9234b46..6189407 100644
> --- a/android/gatt.c
> +++ b/android/gatt.c
> @@ -3643,9 +3643,15 @@ static void send_dev_pending_response(struct gatt_device *device,
>  			goto done;
>  		}
>  
> +		if (val->error) {
> +			queue_destroy(temp, NULL);
> +			error = val->error;
> +			goto done;
> +		}
> +
>  		length = val->length;
>  
> -		while (val && val->length == length) {
> +		while (val && val->length == length && val->error == 0) {
>  			queue_push_tail(temp, val);
>  			val = queue_pop_head(device->pending_requests);
>  		}

This patch is now pushed, thanks.

-- 
Best regards, 
Szymon Janc

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

end of thread, other threads:[~2014-05-28  9:27 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:17 [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type Jakub Tyszkowski
2014-05-28  9:18 ` [PATCHv2 2/2] android/pts: Update GATT PTS results Jakub Tyszkowski
2014-05-28  9:27 ` [PATCHv2 1/2] android/gatt: Fix not checking for read errors in read by type Szymon Janc

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