Skip to content

Commit 3304d62

Browse files
committed
Update
Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
1 parent b5660d0 commit 3304d62

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

rmw_microxrcedds_c/include/rmw_microros/memory_error_handling.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
#ifndef RMW_MICROROS__MEMORY_ERROR_HANDLING_H_
2020
#define RMW_MICROROS__MEMORY_ERROR_HANDLING_H_
2121

22-
// #include <rmw/rmw.h>
23-
// #include <rmw/ret_types.h>
24-
// #include <rmw/init_options.h>
25-
// #include <rmw_microxrcedds_c/config.h>
26-
// #include <ucdr/microcdr.h>
22+
#include <ucdr/microcdr.h>
2723

2824
#if defined(__cplusplus)
2925
extern "C"
@@ -32,7 +28,7 @@ extern "C"
3228

3329
typedef void (* rmw_uros_memory_error_handling)(
3430
char * identifier,
35-
uint8_t * buffer,
31+
ucdrBuffer * ucdr,
3632
size_t size);
3733

3834
/** \addtogroup rmw micro-ROS RMW API

rmw_microxrcedds_c/src/callbacks.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ void on_topic(
8181
UXR_UNLOCK(&static_buffer_memory.mutex);
8282
if (NULL != memory_error_callback) {
8383
memory_error_callback(
84-
"Not available static_buffer_memory for subscription", ub->iterator,
85-
length);
84+
"Not available static_buffer_memory for subscription", ub,length);
8685
}
8786
return;
8887
}
@@ -138,8 +137,7 @@ void on_request(
138137
UXR_UNLOCK(&static_buffer_memory.mutex);
139138
if (NULL != memory_error_callback) {
140139
memory_error_callback(
141-
"Not available static_buffer_memory for request", ub->iterator,
142-
length);
140+
"Not available static_buffer_memory for request", ub, length);
143141
}
144142
return;
145143
}
@@ -197,8 +195,7 @@ void on_reply(
197195
UXR_UNLOCK(&static_buffer_memory.mutex);
198196
if (NULL != memory_error_callback) {
199197
memory_error_callback(
200-
"Not available static_buffer_memory for reply", ub->iterator,
201-
length);
198+
"Not available static_buffer_memory for reply", ub, length);
202199
}
203200
return;
204201
}

0 commit comments

Comments
 (0)