Commit 2b4194f1 authored by Chun Fan's avatar Chun Fan
Browse files

Fixed merge conflict in ble_gap_evt_app.c in v5

parent 50c1147e
/**
* Copyright (c) 2014 - 2017, Nordic Semiconductor ASA
*
*
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
*
* 4. This software, with or without modification, must only be used with a
* Nordic Semiconductor ASA integrated circuit.
*
*
* 5. Any software provided in binary form under this license must not be reverse
* engineered, decompiled, modified and/or disassembled.
*
*
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
......@@ -35,7 +35,7 @@
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*
*/
#include "ble_gap_evt_app.h"
#include "ble_serialization.h"
......@@ -47,7 +47,6 @@
//extern ser_ble_gap_app_keyset_t m_app_keys_table[];
uint32_t ble_gap_evt_adv_report_dec(uint8_t const * const p_buf,
uint32_t packet_len,
ble_evt_t * const p_event,
......@@ -88,14 +87,11 @@ uint32_t ble_gap_evt_auth_status_dec(uint8_t const * const p_buf,
SER_PULL_FIELD(&p_event->evt.gap_evt.params.auth_status, ble_gap_evt_auth_status_t_dec);
// keyset is an extension of standard event data - used to synchronize keys at application
//TODO: Add proper impl for keyset
//ser_ble_gap_app_keyset_t *keyset;
uint32_t keyset_index;
err_code = app_ble_gap_sec_context_find(p_event->evt.gap_evt.conn_handle, &keyset_index);
if (err_code == NRF_SUCCESS)
{
ser_ble_gap_app_keyset_t keyset = {0};
SER_PULL_FIELD(&(keyset.keyset), ble_gap_sec_keyset_t_dec);
SER_PULL_FIELD(&(m_app_keys_table[keyset_index].keyset), ble_gap_sec_keyset_t_dec);
err_code = app_ble_gap_sec_context_destroy(p_event->evt.gap_evt.conn_handle);
SER_ASSERT(err_code == NRF_SUCCESS, err_code);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment