Skip to content

Commit

Permalink
Release v2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogs9 authored Sep 28, 2022
2 parents 6f4edd2 + f929700 commit fda7242
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ list(APPEND _deps "microcdr\;${_microcdr_version}")
###############################################################################
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
if(NOT UCLIENT_SUPERBUILD)
project(microxrcedds_client VERSION "2.2.0" LANGUAGES C)
project(microxrcedds_client VERSION "2.2.1" LANGUAGES C)
else()
project(uclient_superbuild NONE)
include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ bool uxr_udp_recv_datagram(
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;

setsockopt(transport->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
if (0 != setsockopt(transport->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)))
{
return false;
}

ssize_t bytes_received = recv(transport->fd, (void*)transport->buffer, sizeof(transport->buffer), 0);
if (-1 != bytes_received)
Expand Down
6 changes: 5 additions & 1 deletion src/c/profile/transport/ip/tcp/tcp_transport_posix_nopoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ size_t uxr_read_tcp_data_platform(
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;

setsockopt(platform->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
if (0 != setsockopt(platform->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)))
{
*errcode = 1;
return 0;
}

ssize_t bytes_received = recv(platform->fd, (void*)buf, len, 0);
if (-1 != bytes_received)
Expand Down
6 changes: 5 additions & 1 deletion src/c/profile/transport/ip/udp/udp_transport_posix_nopoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ size_t uxr_read_udp_data_platform(
tv.tv_sec = timeout / 1000;
tv.tv_usec = (timeout % 1000) * 1000;

setsockopt(platform->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
if (0 != setsockopt(platform->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)))
{
*errcode = 1;
return 0;
}

ssize_t bytes_received = recv(platform->fd, (void*)buf, len, 0);
if (-1 != bytes_received)
Expand Down

0 comments on commit fda7242

Please sign in to comment.