Merge pull request #10046 from haukepetersen/fix_nanocoap_usecorrecttypedef
net/nanocoap: use correct type param for _bulid_hdr()
This commit is contained in:
commit
8e9c28dac3
@ -44,7 +44,7 @@ extern "C" {
|
||||
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] path remote path
|
||||
|
||||
@ -94,7 +94,7 @@ ssize_t nanocoap_get(sock_udp_ep_t *remote, const char *path, uint8_t *buf, size
|
||||
uint8_t *pktpos = 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);
|
||||
pkt.payload = pktpos;
|
||||
pkt.payload_len = 0;
|
||||
|
||||
@ -34,7 +34,7 @@ static void test_nanocoap__hdr(void)
|
||||
unsigned char path_tmp[64] = {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);
|
||||
pktpos += coap_opt_put_location_path(pktpos, 0, loc_path);
|
||||
pktpos += coap_opt_put_uri_path(pktpos, COAP_OPT_LOCATION_PATH, path);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user