* Fix memory problems in rcl.
There are actually two problems here. In one of the problems,
we were sometimes taking an rcl_guard_condition that we did *not*
allocate, and trying to deallocate it. This was leading to
double frees.
The second problem was forgetting to call guard_condition_fini
during node_fini.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Drop duplicated check for overwriting previous error.
As pointed out by Dirk in review, the RCL_SET_ERROR_MSG
macro (through the rcutils_set_error_state() function)
already checks to see if a message is being dropped and
warns about it. Thus, we don't need to do it ourselves.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Implemented service is valid check.
* Added an is-valid check for publishers.
* Changed the checks to the single call to
* Added subscription is_valid function, and replaced individual checks with a call to the function in the subscription code.
* Added documentation for is_valid functions.
* Moved the options pointer check into the is_valid function.
* Implemented client checks.
* use rcl_allocator for rcl_lifecycle
* correct return value interpretation
* fix unsigned comparison
* use namespace for lifecycle in-built topics
* linters
* Explicitly set C99 and C++14 via the CMake variables
* Enable passing CMAKE_C_STANDARD and CMAKE_CXX_STANDARD externally
* Use add_compile_options
* Be more specific about the compiler, independent from the OS
* Check compiler, not OS. Use add_compile_options instead of CMAKE_C_FLAGS and CMAKE_CXX_FLAGS
* add_compile_options() takes a list, not a string
* switch to c11 because of redefinition warnings
avoid typedef redifinition warning on macos
remove todo, compiler come from redefinition of typedef
* add functions to find certificates in filesystem
* only pass the security root path to the rmw
* remove unused code
* fix memory leak
* style
* memory leak round 2
* temporary ifdef for file permission flags
* _S_IREAD works only for file not directories
* use c_utililties functions
* add todo to use c_utility/concat rather that snprintf
* remove now unnecessary stat include
* use backslash separator for path on windows
* duh
* update c_utilities imports and functions signatures
* use c_utilities to concatenate paths
* print debug msg to stdout
* suppress warning, put sros env var as static at the beginnign of the file
* pass local namespace
* more c_utilities renaming
* comment out debug prints for now
* add env vars for security strategy and enforce them
* use rmw_node_security_options structure
* line length
* remove unused conditional
* rename environment variable
* style
* use defines for env var names and use rcutils_stringify on it
* remove unnecessary assignment
* consistent define naming for environment variables names
* stringify SECURITY_ROOST_DIRECTORY
* fix documentation of expand_topic_name()
* use expand_topic_name() in pub/sub/client/service
* update test expectations
* use absolute topic names to avoid mismatch due to expansion
* propagate new functions from rcutils error handling
* convert given rcl allocator to a rcutils allocator
* update to use new rmw function name
* add rcl_validate_topic_name()
* add rcl_expand_topic_name()
* gcc couldn't handle the init lists with tuples
* uncrustify and cpplint
* fix signed compare warnings
* address comments
* organize the substitution string constants together at the top of the file
* comment
* moved allocator to c_utilities
* moved error_handling to c_utilities
* refactor uses of RCL_SET_ERROR_MSG with allocator
* add missing guard condition functions and tests
* add missing timer functions
* refactor rcl_lifecycyle
* missed an instance of RCL_SET_ERROR_MSG
* fix segfaults in error cases for rcl_lifecycle
* remove extra header
* check return code of rcl_lifecycle_init_default_state_machine
* add concept of node namespace to rcl API
also validate node name and node namespace
* name_space -> namespace_
* doc clarification
* make use of rmw_validate_namespace()
* clear expected error messages in test_node.cpp
* avoid unused invalid_index
* include the validation result value when it is unknown
* use _snprintf_s on windows
* uncrustify