/* Function for handling Disconnected event received from the SoftDevice. 
This function check if the disconnect event is happening on the link associated with the current instance of the module, if so it will set its conn_handle to invalid. */
static void on_disconnected(ble_ancs_c_t *p_ancs, const ble_evt_t *p_ble_evt)
/* Function for handling Disconnected event received from the SoftDevice. 
This function check if the disconnect event is happening on the link associated with the current instance of the module, if so it will set its conn_handle to invalid. */
static void on_disconnected(ble_ancs_c_t *p_ancs, const ble_evt_t *p_ble_evt)
{
    if (p_ancs->conn_handle == p_ble_evt->evt.gap_evt.conn_handle)
    {
        p_ancs->conn_handle = BLE_CONN_HANDLE_INVALID;
    }
}