Skip to content

Commit

Permalink
Release v2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Acuadros95 authored Jul 10, 2023
2 parents a2937bc + b8dbfaa commit 9717530
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,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.4.0" LANGUAGES C)
project(microxrcedds_client VERSION "2.4.1" LANGUAGES C)
else()
project(uclient_superbuild NONE)
include(${PROJECT_SOURCE_DIR}/cmake/SuperBuild.cmake)
Expand Down
12 changes: 6 additions & 6 deletions src/c/core/session/stream/output_reliable_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ bool uxr_prepare_reliable_buffer_to_write(
uint8_t* buffer = uxr_get_reliable_buffer(&stream->base, seq_num);
size_t buffer_size = uxr_get_reliable_buffer_size(&stream->base, seq_num);

uint16_t available_block_size = (uint16_t)(buffer_capacity - (uint16_t)(stream->offset + SUBHEADER_SIZE));
size_t remaining_blocks = get_available_free_slots(stream);

// Aligment required for inserting an XRCE subheader
buffer_size += ucdr_alignment(buffer_size, 4);

Expand Down Expand Up @@ -95,7 +98,7 @@ bool uxr_prepare_reliable_buffer_to_write(
}
}
/* Check if the message fit in a fragmented message */
else
else if (length <= available_block_size * remaining_blocks)
{
/* Check if the current buffer free space is too small */
if (buffer_size + (size_t)SUBHEADER_SIZE >= buffer_capacity)
Expand All @@ -105,13 +108,10 @@ bool uxr_prepare_reliable_buffer_to_write(
buffer_size = uxr_get_reliable_buffer_size(&stream->base, seq_num);
}

size_t remaining_blocks = get_available_free_slots(stream);

uint16_t available_block_size = (uint16_t)(buffer_capacity - (uint16_t)(stream->offset + SUBHEADER_SIZE));
uint16_t first_fragment_size = (uint16_t)(buffer_capacity - (uint16_t)(buffer_size + SUBHEADER_SIZE));
size_t remaining_size = length - first_fragment_size;
size_t last_fragment_size;
uint16_t necessary_complete_blocks;
size_t last_fragment_size = 0;
uint16_t necessary_complete_blocks = 0;
if (0 == (remaining_size % available_block_size))
{
last_fragment_size = available_block_size;
Expand Down
2 changes: 1 addition & 1 deletion src/c/profile/transport/ip/udp/udp_transport_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ bool uxr_init_udp_platform(
break;
}
}
freeaddrinfo(result);
}
freeaddrinfo(result);
}
return rv;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ bool uxr_init_udp_platform(
break;
}
}
freeaddrinfo(result);
}
freeaddrinfo(result);
}
return rv;
}
Expand Down
2 changes: 1 addition & 1 deletion src/c/profile/transport/ip/udp/udp_transport_windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ bool uxr_init_udp_platform(
break;
}
}
freeaddrinfo(result);
}
freeaddrinfo(result);
}
return rv;
}
Expand Down

0 comments on commit 9717530

Please sign in to comment.