This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 572e5fb94 host/gap: fix typo in GAP event macro
572e5fb94 is described below

commit 572e5fb9461b8cabe7c121fc46dd27ef8d943fcd
Author: Wojciech Pietraszewski <[email protected]>
AuthorDate: Thu Jan 25 10:03:46 2024 +0100

    host/gap: fix typo in GAP event macro
    
    Corrects spelling in BLE_GAP_EVENT_PAIRING_COMPLETE
---
 apps/bttester/src/btp_gap.c        | 2 +-
 nimble/host/include/host/ble_gap.h | 8 ++++++--
 nimble/host/src/ble_gap.c          | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/apps/bttester/src/btp_gap.c b/apps/bttester/src/btp_gap.c
index 0b2239149..79ec5152f 100644
--- a/apps/bttester/src/btp_gap.c
+++ b/apps/bttester/src/btp_gap.c
@@ -1511,7 +1511,7 @@ gap_event_cb(struct ble_gap_event *event, void *arg)
             == REJECT_SUPERVISION_TIMEOUT) {
             return EINVAL;
         }
-    case BLE_GAP_EVENT_PARING_COMPLETE:
+    case BLE_GAP_EVENT_PAIRING_COMPLETE:
         console_printf("received pairing complete: "
                        "conn_handle=%d status=%d\n",
                        event->pairing_complete.conn_handle,
diff --git a/nimble/host/include/host/ble_gap.h 
b/nimble/host/include/host/ble_gap.h
index a8f6e3c54..271933963 100644
--- a/nimble/host/include/host/ble_gap.h
+++ b/nimble/host/include/host/ble_gap.h
@@ -247,7 +247,10 @@ struct hci_conn_update;
 #define BLE_GAP_EVENT_TRANSMIT_POWER        26
 
 /** GAP event: Pairing complete */
-#define BLE_GAP_EVENT_PARING_COMPLETE       27
+#define BLE_GAP_EVENT_PAIRING_COMPLETE      27
+
+/** GAP event: Pairing complete (deprecated) */
+#define BLE_GAP_EVENT_PARING_COMPLETE BLE_GAP_EVENT_PAIRING_COMPLETE
 
 /** GAP event: Subrate change */
 #define BLE_GAP_EVENT_SUBRATE_CHANGE        28
@@ -1245,7 +1248,8 @@ struct ble_gap_event {
          * Represents a received Pairing Complete message
          *
          * Valid for the following event types:
-         *     o BLE_GAP_EVENT_PARING_COMPLETE
+         *     o BLE_GAP_EVENT_PAIRING_COMPLETE
+         *     o BLE_GAP_EVENT_PARING_COMPLETE (deprecated)
          */
         struct {
             /**
diff --git a/nimble/host/src/ble_gap.c b/nimble/host/src/ble_gap.c
index eb4e6f601..85d7a9e4c 100644
--- a/nimble/host/src/ble_gap.c
+++ b/nimble/host/src/ble_gap.c
@@ -6382,7 +6382,7 @@ ble_gap_pairing_complete_event(uint16_t conn_handle, int 
status)
     struct ble_gap_event event;
 
     memset(&event, 0, sizeof event);
-    event.type = BLE_GAP_EVENT_PARING_COMPLETE;
+    event.type = BLE_GAP_EVENT_PAIRING_COMPLETE;
     event.pairing_complete.conn_handle = conn_handle;
     event.pairing_complete.status = status;
     ble_gap_call_conn_event_cb(&event, conn_handle);

Reply via email to