Skip to content

Commit 8fd874e

Browse files
maxd-nordicnordicjm
authored andcommitted
lib: nrf_cloud: use zephyr sockets
Use Zephyr sockets directly to remove the need for POSIX_API kconfig. Signed-off-by: Maximilian Deubel <[email protected]>
1 parent 175fbe2 commit 8fd874e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/net/lib/nrf_cloud/src/nrf_cloud_download.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int nrf_cloud_download_handle_coap_auth(int socket)
8989

9090
/* Send the request */
9191
LOG_DBG("Sending CoAP auth request, size %zu", request_size);
92-
err = send(socket, packet_buf, request_size, 0);
92+
err = zsock_send(socket, packet_buf, request_size, 0);
9393
if (err < 0) {
9494
LOG_ERR("Failed to send CoAP request, errno %d", errno);
9595
goto end;
@@ -98,7 +98,7 @@ int nrf_cloud_download_handle_coap_auth(int socket)
9898
for (size_t i = 0; i < 10; ++i) {
9999
k_sleep(K_MSEC(COAP_REQ_WAIT_TIME_MS));
100100
/* Poll for response */
101-
err = recv(socket, packet_buf, COAP_AUTH_REQ_BUF_SIZE, MSG_DONTWAIT);
101+
err = zsock_recv(socket, packet_buf, COAP_AUTH_REQ_BUF_SIZE, ZSOCK_MSG_DONTWAIT);
102102
if (err < 0) {
103103
if (errno == EAGAIN || errno == EWOULDBLOCK) {
104104
continue;

0 commit comments

Comments
 (0)