1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

treewide: adapt to gcoap_req_send aux local API change

This commit is contained in:
Fabian Hüßler 2024-05-25 20:29:59 +02:00
parent 3973e4bb9d
commit 40fb250ae4
6 changed files with 11 additions and 9 deletions

View File

@ -174,7 +174,7 @@ static gcoap_socket_type_t _get_tl(const char *uri)
static ssize_t _send(uint8_t *buf, size_t len, const sock_udp_ep_t *remote,
void *ctx, gcoap_socket_type_t tl)
{
ssize_t bytes_sent = gcoap_req_send(buf, len, remote, _resp_handler, ctx, tl);
ssize_t bytes_sent = gcoap_req_send(buf, len, remote, NULL, _resp_handler, ctx, tl);
if (bytes_sent > 0) {
req_count++;
}

View File

@ -330,7 +330,7 @@
* coap_opt_add_proxy_uri(&pdu, uri);
* unsigned len = coap_opt_finish(&pdu, COAP_OPT_FINISH_NONE);
*
* gcoap_req_send((uint8_t *) pdu->hdr, len, proxy_remote, _resp_handler, NULL,
* gcoap_req_send((uint8_t *) pdu->hdr, len, proxy_remote, NULL, _resp_handler, NULL,
* GCOAP_SOCKET_TYPE_UNDEF);
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*

View File

@ -151,7 +151,8 @@ static int _update_remove(unsigned code, gcoap_resp_handler_t handle)
ssize_t pkt_len = coap_opt_finish(&pkt, COAP_OPT_FINISH_NONE);
/* send request */
ssize_t send_len = gcoap_req_send(buf, pkt_len, &_rd_remote, handle, NULL, GCOAP_SOCKET_TYPE_UNDEF);
ssize_t send_len = gcoap_req_send(buf, pkt_len, &_rd_remote, NULL,
handle, NULL, GCOAP_SOCKET_TYPE_UNDEF);
if (send_len <= 0) {
return CORD_EP_ERR;
}
@ -225,7 +226,7 @@ static int _discover_internal(const sock_udp_ep_t *remote,
coap_hdr_set_type(pkt.hdr, COAP_TYPE_CON);
coap_opt_add_uri_query(&pkt, "rt", "core.rd");
size_t pkt_len = coap_opt_finish(&pkt, COAP_OPT_FINISH_NONE);
res = gcoap_req_send(buf, pkt_len, remote, _on_discover, NULL, GCOAP_SOCKET_TYPE_UNDEF);
res = gcoap_req_send(buf, pkt_len, remote, NULL, _on_discover, NULL, GCOAP_SOCKET_TYPE_UNDEF);
if (res <= 0) {
return CORD_EP_ERR;
}
@ -296,7 +297,7 @@ int cord_ep_register(const sock_udp_ep_t *remote, const char *regif)
pkt_len += res;
/* send out the request */
res = gcoap_req_send(buf, pkt_len, remote, _on_register, NULL, GCOAP_SOCKET_TYPE_UNDEF);
res = gcoap_req_send(buf, pkt_len, remote, NULL, _on_register, NULL, GCOAP_SOCKET_TYPE_UNDEF);
if (res <= 0) {
retval = CORD_EP_ERR;
goto end;

View File

@ -67,7 +67,7 @@ int cord_epsim_register(const sock_udp_ep_t *rd_ep)
/* finish, we don't have any payload */
ssize_t len = coap_opt_finish(&pkt, COAP_OPT_FINISH_NONE);
_state = CORD_EPSIM_BUSY;
if (gcoap_req_send(buf, len, rd_ep, _req_handler, NULL, GCOAP_SOCKET_TYPE_UNDEF) == 0) {
if (gcoap_req_send(buf, len, rd_ep, NULL, _req_handler, NULL, GCOAP_SOCKET_TYPE_UNDEF) == 0) {
return CORD_EPSIM_ERROR;
}

View File

@ -190,7 +190,8 @@ static ssize_t _lookup_raw(const cord_lc_rd_t *rd, unsigned content_format,
if (pkt_len < 0) {
return CORD_LC_ERR;
}
res = gcoap_req_send(reqbuf, pkt_len, rd->remote, _on_lookup, NULL, GCOAP_SOCKET_TYPE_UNDEF);
res = gcoap_req_send(reqbuf, pkt_len, rd->remote, NULL,
_on_lookup, NULL, GCOAP_SOCKET_TYPE_UNDEF);
if (res < 0) {
return CORD_LC_ERR;
}
@ -259,7 +260,7 @@ static int _send_rd_init_req(coap_pkt_t *pkt, const sock_udp_ep_t *remote,
return CORD_LC_ERR;
}
if (!gcoap_req_send(buf, pkt_len, remote, _on_rd_init, NULL, GCOAP_SOCKET_TYPE_UNDEF)) {
if (!gcoap_req_send(buf, pkt_len, remote, NULL, _on_rd_init, NULL, GCOAP_SOCKET_TYPE_UNDEF)) {
DEBUG("cord_lc: error gcoap_req_send()\n");
return CORD_LC_ERR;
}

View File

@ -762,6 +762,6 @@ static ssize_t _send(const void *buf, size_t len, const sock_udp_ep_t *remote,
if (lock_resp_wait) {
mutex_lock(&context->resp_wait);
}
return gcoap_req_send(buf, len, remote, _resp_handler, context, tl_type);
return gcoap_req_send(buf, len, remote, NULL, _resp_handler, context, tl_type);
}
/** @} */