diff --git a/src/coap_client.c b/src/coap_client.c index fac7287b2..0ce138612 100644 --- a/src/coap_client.c +++ b/src/coap_client.c @@ -696,11 +696,10 @@ enum golioth_status golioth_coap_client_observe(struct golioth_client *client, } enum golioth_status golioth_coap_client_observe_release(struct golioth_client *client, + const uint8_t token[GOLIOTH_COAP_TOKEN_LEN], const char *path_prefix, const char *path, enum golioth_content_type content_type, - uint8_t *token, - size_t token_len, void *arg) { if (!client || !path) diff --git a/src/coap_client.h b/src/coap_client.h index d384519f6..b98f679ee 100644 --- a/src/coap_client.h +++ b/src/coap_client.h @@ -238,11 +238,10 @@ enum golioth_status golioth_coap_client_observe(struct golioth_client *client, void *callback_arg); enum golioth_status golioth_coap_client_observe_release(struct golioth_client *client, + const uint8_t token[GOLIOTH_COAP_TOKEN_LEN], const char *path_prefix, const char *path, enum golioth_content_type content_type, - uint8_t *token, - size_t token_len, void *arg); void golioth_coap_client_cancel_all_observations(struct golioth_client *client); diff --git a/src/coap_client_libcoap.c b/src/coap_client_libcoap.c index 413b3a329..f2432091a 100644 --- a/src/coap_client_libcoap.c +++ b/src/coap_client_libcoap.c @@ -648,11 +648,10 @@ void golioth_cancel_all_observations_by_prefix(struct golioth_client *client, co obs_info->in_use = false; golioth_coap_client_observe_release(client, + obs_info->req.token, obs_info->req.path_prefix, obs_info->req.path, obs_info->req.observe.content_type, - obs_info->req.token, - GOLIOTH_COAP_TOKEN_LEN, NULL); } } diff --git a/src/zephyr_coap_req.c b/src/zephyr_coap_req.c index 24dcf9501..815a8494a 100644 --- a/src/zephyr_coap_req.c +++ b/src/zephyr_coap_req.c @@ -839,11 +839,10 @@ static int __golioth_coap_req_find_and_cancel_observation( /* Enqueue an "eager release" request for this observation */ err = golioth_coap_client_observe_release(client, + coap_token, req_msg->path_prefix, req_msg->path, coap_content_format, - coap_token, - GOLIOTH_COAP_TOKEN_LEN, NULL); if (err) {