Skip to content

Commit 3a7b60e

Browse files
committed
net/cord_epsim: adapt to gcoap API changes
1 parent 7b1217a commit 3a7b60e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sys/net/application_layer/cord/epsim/cord_epsim.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ static uint8_t buf[BUFSIZE];
3737
/* keep state of the latest registration attempt */
3838
static int _state = CORD_EPSIM_ERROR;
3939

40-
static void _req_handler(unsigned req_state, coap_pkt_t* pdu,
41-
sock_udp_ep_t *remote)
40+
static void _req_handler(const gcoap_request_memo_t *memo, coap_pkt_t* pdu,
41+
const sock_udp_ep_t *remote)
4242
{
4343
(void)remote;
4444
(void)pdu;
45-
_state = (req_state == GCOAP_MEMO_RESP) ? CORD_EPSIM_OK : CORD_EPSIM_ERROR;
45+
_state = (memo->state == GCOAP_MEMO_RESP) ? CORD_EPSIM_OK : CORD_EPSIM_ERROR;
4646
}
4747

4848
int cord_epsim_register(const sock_udp_ep_t *rd_ep)
@@ -67,7 +67,7 @@ int cord_epsim_register(const sock_udp_ep_t *rd_ep)
6767
/* finish, we don't have any payload */
6868
ssize_t len = gcoap_finish(&pkt, 0, COAP_FORMAT_NONE);
6969
_state = CORD_EPSIM_BUSY;
70-
if (gcoap_req_send(buf, len, rd_ep, _req_handler) == 0) {
70+
if (gcoap_req_send(buf, len, rd_ep, _req_handler, NULL) == 0) {
7171
return CORD_EPSIM_ERROR;
7272
}
7373

0 commit comments

Comments
 (0)