Skip to content

Commit f7c5684

Browse files
security-context -> enclave
Signed-off-by: Mikael Arguedas <[email protected]>
1 parent 052acc3 commit f7c5684

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

rmw_dds_common/include/rmw_dds_common/graph_cache.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ class GraphCache
172172
/// Add a discovered participant to the cache.
173173
/**
174174
* \param gid The participant guid.
175-
* \param security_context Name of the security context.
175+
* \param enclave Name of the enclave.
176176
*/
177177
RMW_DDS_COMMON_PUBLIC
178178
void
179179
add_participant(
180180
const rmw_gid_t & participant_gid,
181-
const std::string & security_context);
181+
const std::string & enclave);
182182

183183
/// Remove a participant based on discovery.
184184
/**
@@ -477,7 +477,7 @@ class GraphCache
477477
* \param[inout] node_namespaces A zero initialized string array, where the node namespaces
478478
* will be copied. Each item in this array corresponds to an item in the same position of
479479
* node_names array. Must not be `nullptr`.
480-
* \param[inout] security_contexts A zero initialized string array, where the security context
480+
* \param[inout] enclaves A zero initialized string array, where the enclave
481481
* name of the node will be copied. Each item in this array corresponds to an item in the same
482482
* position of node_names array. In case is `nullptr`, it won't be used.
483483
* \param[in] allocator.
@@ -491,7 +491,7 @@ class GraphCache
491491
get_node_names(
492492
rcutils_string_array_t * node_names,
493493
rcutils_string_array_t * node_namespaces,
494-
rcutils_string_array_t * security_contexts,
494+
rcutils_string_array_t * enclaves,
495495
rcutils_allocator_t * allocator) const;
496496

497497
/**
@@ -521,7 +521,7 @@ operator<<(std::ostream & ostream, const GraphCache & topic_cache);
521521
struct ParticipantInfo
522522
{
523523
GraphCache::NodeEntitiesInfoSeq node_entities_info_seq;
524-
std::string security_context;
524+
std::string enclave;
525525
};
526526

527527
struct EntityInfo

rmw_dds_common/src/graph_cache.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ __create_participant_info_message(
191191
void
192192
GraphCache::add_participant(
193193
const rmw_gid_t & participant_gid,
194-
const std::string & security_context)
194+
const std::string & enclave)
195195
{
196196
std::lock_guard<std::mutex> guard(mutex_);
197197
auto it = participants_.find(participant_gid);
@@ -203,7 +203,7 @@ GraphCache::add_participant(
203203
it = ret.first;
204204
assert(ret.second);
205205
}
206-
it->second.security_context = security_context;
206+
it->second.enclave = enclave;
207207
GRAPH_CACHE_CALL_ON_CHANGE_CALLBACK(this);
208208
}
209209

@@ -924,7 +924,7 @@ rmw_ret_t
924924
GraphCache::get_node_names(
925925
rcutils_string_array_t * node_names,
926926
rcutils_string_array_t * node_namespaces,
927-
rcutils_string_array_t * security_contexts,
927+
rcutils_string_array_t * enclaves,
928928
rcutils_allocator_t * allocator) const
929929
{
930930
std::lock_guard<std::mutex> guard(mutex_);
@@ -935,8 +935,8 @@ GraphCache::get_node_names(
935935
return RMW_RET_INVALID_ARGUMENT;
936936
}
937937
if (
938-
security_contexts &&
939-
RMW_RET_OK != rmw_check_zero_rmw_string_array(security_contexts))
938+
enclaves &&
939+
RMW_RET_OK != rmw_check_zero_rmw_string_array(enclaves))
940940
{
941941
return RMW_RET_INVALID_ARGUMENT;
942942
}
@@ -960,9 +960,9 @@ GraphCache::get_node_names(
960960
RMW_SET_ERROR_MSG(error_msg.str);
961961
goto fail;
962962
}
963-
if (security_contexts) {
963+
if (enclaves) {
964964
rcutils_ret =
965-
rcutils_string_array_init(security_contexts, nodes_number, allocator);
965+
rcutils_string_array_init(enclaves, nodes_number, allocator);
966966
if (RCUTILS_RET_OK != rcutils_ret) {
967967
rcutils_error_string_t error_msg = rcutils_get_error_string();
968968
rcutils_reset_error();
@@ -984,10 +984,10 @@ GraphCache::get_node_names(
984984
if (!node_namespaces->data[j]) {
985985
goto fail;
986986
}
987-
if (security_contexts) {
988-
security_contexts->data[j] = rcutils_strdup(
989-
nodes_info.security_context.c_str(), *allocator);
990-
if (!security_contexts->data[j]) {
987+
if (enclaves) {
988+
enclaves->data[j] = rcutils_strdup(
989+
nodes_info.enclave.c_str(), *allocator);
990+
if (!enclaves->data[j]) {
991991
goto fail;
992992
}
993993
}
@@ -1036,7 +1036,7 @@ rmw_dds_common::operator<<(std::ostream & ostream, const GraphCache & graph_cach
10361036
ss << " Discovered participants:" << std::endl;
10371037
for (const auto & item : graph_cache.participants_) {
10381038
ss << " gid: '" << item.first << std::endl;
1039-
ss << " security context name '" << item.second.security_context << std::endl;
1039+
ss << " enclave name '" << item.second.enclave << std::endl;
10401040
ss << " nodes:" << std::endl;
10411041
for (const auto & node_info : item.second.node_entities_info_seq) {
10421042
ss << " namespace: '" << node_info.node_namespace << "' name: '" <<

0 commit comments

Comments
 (0)