Singh-Sumeet commented on code in PR #1668:
URL: https://github.com/apache/mynewt-nimble/pull/1668#discussion_r1442547803


##########
nimble/host/include/host/ble_gap.h:
##########
@@ -292,6 +295,19 @@ struct hci_conn_update;
 
 /** @} */
 
+/**
+ * @defgroup GAP Authorize event possible responses.
+ * @{
+ */
+
+/** GAP Authorize event response: accept */
+#define BLE_GAP_AUTHORIZE_ACCEPT            1
+
+/** GAP Authorize event response: reject */
+#define BLE_GAP_AUTHORIZE_REJECT            2

Review Comment:
   I see two problems with that.
   
   1. The return values are normally used for error codes, I guess maybe 
returning BLE_HS_EREJECT will work for rejecting.
   2. The default return code in gap_event in the apps is 0. So if the user 
does not handle the event, the app will return 0, which will be interpreted as 
"ACCEPT".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to