Skip to content

Commit

Permalink
host/gap: fix typo in GAP event macro
Browse files Browse the repository at this point in the history
Corrects spelling in BLE_GAP_EVENT_PAIRING_COMPLETE
  • Loading branch information
wpiet authored and sjanc committed Jan 29, 2024
1 parent a7c6153 commit 572e5fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/bttester/src/btp_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 6 additions & 2 deletions nimble/host/include/host/ble_gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
/**
Expand Down
2 changes: 1 addition & 1 deletion nimble/host/src/ble_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 572e5fb

Please sign in to comment.