Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
Reuse C++ typesupport in C services
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackie Kay committed Mar 2, 2016
1 parent 0935471 commit f645b49
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 498 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ convert_ros_to_dds(const void * untyped_ros_message, void * untyped_dds_message)
if (!str) {
return "string field was not allocated";
}
// TODO revert
if (/*!(str->capacity == 0 && str->size == 0) &&*/ str->capacity <= str->size) {
if (str->capacity == 0 || str->capacity <= str->size) {
return "string capacity not greater than size";
}
if (!str->data) {
Expand Down Expand Up @@ -216,8 +215,7 @@ convert_ros_to_dds(const void * untyped_ros_message, void * untyped_dds_message)
if (!str) {
return "string field was not allocated";
}
//if (/*str->capacity == 0 ||*/ str->capacity <= str->size) {
if (!(str->capacity == 0 && str->size == 0) && str->capacity <= str->size) {
if (str->capacity == 0 || str->capacity <= str->size) {
return "string capacity not greater than size";
}
if (!str->data) {
Expand Down
Loading

0 comments on commit f645b49

Please sign in to comment.