Lines Matching refs:token

443 static void engine_observe_node_init(struct observe_node *obs, const uint8_t *token,  in engine_observe_node_init()  argument
449 memcpy(obs->token, token, tkl); in engine_observe_node_init()
473 LOG_DBG("token:'%s' addr:%s", sprint_token(token, tkl), in engine_observe_node_init()
547 const uint8_t *token, uint8_t tkl) in engine_observe_node_discover() argument
576 if (token && memcmp(obs->token, token, tkl)) { in engine_observe_node_discover()
586 static int engine_add_observer(struct lwm2m_message *msg, const uint8_t *token, uint8_t tkl, in engine_add_observer() argument
601 if (!token || (tkl == 0U || tkl > MAX_TOKEN_LEN)) { in engine_add_observer()
602 LOG_ERR("token(%p) and token length(%u) must be valid.", token, tkl); in engine_add_observer()
614 memcpy(obs->token, token, tkl); in engine_add_observer()
641 engine_observe_node_init(obs, token, msg->ctx, tkl, format, attrs.pmax); in engine_add_observer()
668 static int engine_add_composite_observer(struct lwm2m_message *msg, const uint8_t *token, in engine_add_composite_observer() argument
684 if (!token || (tkl == 0U || tkl > MAX_TOKEN_LEN)) { in engine_add_composite_observer()
685 LOG_ERR("token(%p) and token length(%u) must be valid.", token, tkl); in engine_add_composite_observer()
703 memcpy(obs->token, token, tkl); in engine_add_composite_observer()
727 engine_observe_node_init(obs, token, msg->ctx, tkl, format, attrs.pmax); in engine_add_composite_observer()
743 int engine_remove_observer_by_token(struct lwm2m_ctx *ctx, const uint8_t *token, uint8_t tkl) in engine_remove_observer_by_token() argument
748 if (!token || (tkl == 0U || tkl > MAX_TOKEN_LEN)) { in engine_remove_observer_by_token()
749 LOG_ERR("token(%p) and token length(%u) must be valid.", token, tkl); in engine_remove_observer_by_token()
753 obs = engine_observe_node_discover(&ctx->observer, &prev_node, NULL, token, tkl); in engine_remove_observer_by_token()
760 LOG_DBG("observer '%s' removed", sprint_token(token, tkl)); in engine_remove_observer_by_token()
765 static int engine_remove_composite_observer(struct lwm2m_message *msg, const uint8_t *token, in engine_remove_composite_observer() argument
775 if (!token || (tkl == 0U || tkl > MAX_TOKEN_LEN)) { in engine_remove_composite_observer()
776 LOG_ERR("token(%p) and token length(%u) must be valid.", token, tkl); in engine_remove_composite_observer()
790 obs = engine_observe_node_discover(&msg->ctx->observer, &prev_node, &lwm2m_path_list, token, in engine_remove_composite_observer()
798 LOG_DBG("observer '%s' removed", sprint_token(token, tkl)); in engine_remove_composite_observer()
1401 r = engine_add_composite_observer(msg, msg->token, msg->tkl, accept); in lwm2m_engine_observation_handler()
1403 r = engine_add_observer(msg, msg->token, msg->tkl, accept); in lwm2m_engine_observation_handler()
1412 r = engine_remove_composite_observer(msg, msg->token, msg->tkl, accept); in lwm2m_engine_observation_handler()
1414 r = engine_remove_observer_by_token(msg->ctx, msg->token, msg->tkl); in lwm2m_engine_observation_handler()