Skip to content
Snippets Groups Projects
Unverified Commit 8e9c28da authored by Martine Lenders's avatar Martine Lenders Committed by GitHub
Browse files

Merge pull request #10046 from haukepetersen/fix_nanocoap_usecorrecttypedef

net/nanocoap: use correct type param for _bulid_hdr()
parents 478f467d 4a591139
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ extern "C" { ...@@ -44,7 +44,7 @@ extern "C" {
int nanocoap_server(sock_udp_ep_t *local, uint8_t *buf, size_t bufsize); int nanocoap_server(sock_udp_ep_t *local, uint8_t *buf, size_t bufsize);
/** /**
* @brief Simple synchronous CoAP get * @brief Simple synchronous CoAP (confirmable) get
* *
* @param[in] remote remote UDP endpoint * @param[in] remote remote UDP endpoint
* @param[in] path remote path * @param[in] path remote path
......
...@@ -94,7 +94,7 @@ ssize_t nanocoap_get(sock_udp_ep_t *remote, const char *path, uint8_t *buf, size ...@@ -94,7 +94,7 @@ ssize_t nanocoap_get(sock_udp_ep_t *remote, const char *path, uint8_t *buf, size
uint8_t *pktpos = buf; uint8_t *pktpos = buf;
pkt.hdr = (coap_hdr_t*)buf; pkt.hdr = (coap_hdr_t*)buf;
pktpos += coap_build_hdr(pkt.hdr, COAP_REQ, NULL, 0, COAP_METHOD_GET, 1); pktpos += coap_build_hdr(pkt.hdr, COAP_TYPE_CON, NULL, 0, COAP_METHOD_GET, 1);
pktpos += coap_opt_put_uri_path(pktpos, 0, path); pktpos += coap_opt_put_uri_path(pktpos, 0, path);
pkt.payload = pktpos; pkt.payload = pktpos;
pkt.payload_len = 0; pkt.payload_len = 0;
......
...@@ -34,7 +34,7 @@ static void test_nanocoap__hdr(void) ...@@ -34,7 +34,7 @@ static void test_nanocoap__hdr(void)
unsigned char path_tmp[64] = {0}; unsigned char path_tmp[64] = {0};
uint8_t *pktpos = &buf[0]; uint8_t *pktpos = &buf[0];
pktpos += coap_build_hdr((coap_hdr_t *)pktpos, COAP_REQ, NULL, 0, pktpos += coap_build_hdr((coap_hdr_t *)pktpos, COAP_TYPE_CON, NULL, 0,
COAP_METHOD_GET, msgid); COAP_METHOD_GET, msgid);
pktpos += coap_opt_put_location_path(pktpos, 0, loc_path); pktpos += coap_opt_put_location_path(pktpos, 0, loc_path);
pktpos += coap_opt_put_uri_path(pktpos, COAP_OPT_LOCATION_PATH, path); pktpos += coap_opt_put_uri_path(pktpos, COAP_OPT_LOCATION_PATH, path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment