/* Function for storing the event handler provided by a registered application module.  */
static uint32_t registered_handler_set(const ble_uuid_t *const p_srv_uuid, ble_db_discovery_evt_handler_t p_evt_handler)
/* Function for storing the event handler provided by a registered application module.  */
static uint32_t registered_handler_set(const ble_uuid_t *const p_srv_uuid, ble_db_discovery_evt_handler_t p_evt_handler)
{
    if (registered_handler_get(p_srv_uuid) != NULL)
    {
        return NRF_SUCCESS;
    }
    if (m_num_of_handlers_reg < DB_DISCOVERY_MAX_USERS)
    {
        m_registered_handlers[m_num_of_handlers_reg] = *p_srv_uuid;
        m_num_of_handlers_reg++;
        return NRF_SUCCESS;
    }
    else
    {
        return NRF_ERROR_NO_MEM;
    }
}