From 591c4330f61438edfac85d3a920ce8f8f8589498 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu>
Date: Wed, 10 Jan 2018 14:33:05 +0000
Subject: [PATCH] Updated the internal module name at the beginning of the
 constructor and used elsewhere.

---
 include/iri_ros_tools/module.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/iri_ros_tools/module.h b/include/iri_ros_tools/module.h
index fd74147..0166c85 100644
--- a/include/iri_ros_tools/module.h
+++ b/include/iri_ros_tools/module.h
@@ -245,14 +245,14 @@ CModule<ModuleCfg>::CModule(const std::string &name,const std::string &name_spac
 {
   try
   {
+    this->name=this->module_nh.getNamespace();
     this->event_server=CEventServer::instance();
-    this->finish_thread_event_id=name+"_finish_thread_event";
+    this->finish_thread_event_id=this->name+"_finish_thread_event";
     this->event_server->create_event(this->finish_thread_event_id);
     this->thread_server=CThreadServer::instance();
-    this->module_thread_id=name+"_module_thread";
+    this->module_thread_id=this->name+"_module_thread";
     this->thread_server->create_thread(this->module_thread_id);
     this->thread_server->attach_thread(this->module_thread_id,this->module_thread,this);
-    this->name=this->module_nh.getNamespace();
   }
   catch (CException &ex)
   {
-- 
GitLab