diff --git a/examples/gcoap/gcoap_cli.c b/examples/gcoap/gcoap_cli.c index 3c2ae1bfec..b1fa5095a2 100644 --- a/examples/gcoap/gcoap_cli.c +++ b/examples/gcoap/gcoap_cli.c @@ -14,6 +14,7 @@ * @brief gcoap CLI support * * @author Ken Bannister + * @author Hauke Petersen * * @} */ @@ -31,8 +32,8 @@ static ssize_t _encode_link(const coap_resource_t *resource, char *buf, size_t maxlen, coap_link_encoder_ctx_t *context); -static void _resp_handler(unsigned req_state, coap_pkt_t* pdu, - sock_udp_ep_t *remote); +static void _resp_handler(const gcoap_request_memo_t *memo, coap_pkt_t* pdu, + const sock_udp_ep_t *remote); static ssize_t _stats_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, void *ctx); static ssize_t _riot_board_handler(coap_pkt_t* pdu, uint8_t *buf, size_t len, void *ctx); @@ -84,16 +85,16 @@ static ssize_t _encode_link(const coap_resource_t *resource, char *buf, /* * Response callback. */ -static void _resp_handler(unsigned req_state, coap_pkt_t* pdu, - sock_udp_ep_t *remote) +static void _resp_handler(const gcoap_request_memo_t *memo, coap_pkt_t* pdu, + const sock_udp_ep_t *remote) { (void)remote; /* not interested in the source currently */ - if (req_state == GCOAP_MEMO_TIMEOUT) { + if (memo->state == GCOAP_MEMO_TIMEOUT) { printf("gcoap: timeout for msg ID %02u\n", coap_get_id(pdu)); return; } - else if (req_state == GCOAP_MEMO_ERR) { + else if (memo->state == GCOAP_MEMO_ERR) { printf("gcoap: error in response\n"); return; }