Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] android/gatt: Fix incorrect event status
@ 2014-04-10  6:29 Marcin Kraglak
  2014-04-10  8:54 ` Szymon Janc
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Kraglak @ 2014-04-10  6:29 UTC (permalink / raw)
  To: linux-bluetooth

Return proper gatt_status in register_for_notification event.
---
 android/gatt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/android/gatt.c b/android/gatt.c
index 15e788a..971e2dd 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -2482,7 +2482,7 @@ static void handle_client_register_for_notification(const void *buf,
 	status = HAL_STATUS_SUCCESS;
 
 failed:
-	gatt_status  = status ? GATT_SUCCESS : GATT_FAILURE;
+	gatt_status = status ? GATT_FAILURE : GATT_SUCCESS;
 	send_register_for_notification_ev(conn_id, 1, gatt_status,
 						&cmd->srvc_id, &cmd->char_id);
 	ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_GATT,
@@ -2535,7 +2535,7 @@ static void handle_client_deregister_for_notification(const void *buf,
 	status = HAL_STATUS_SUCCESS;
 
 failed:
-	gatt_status  = status ? GATT_SUCCESS : GATT_FAILURE;
+	gatt_status = status ? GATT_FAILURE : GATT_SUCCESS;
 	send_register_for_notification_ev(conn_id, 0, gatt_status,
 						&cmd->srvc_id, &cmd->char_id);
 
-- 
1.8.5.3


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

end of thread, other threads:[~2014-04-10  8:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10  6:29 [PATCH] android/gatt: Fix incorrect event status Marcin Kraglak
2014-04-10  8:54 ` Szymon Janc

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