@@ -173,19 +173,17 @@ void Participant::create_subscription(
173173 DataTypeNameType type_name = discovery_database_->operator [](topic_name).first ;
174174 DynamicType::_ref_type dyn_type;
175175
176- // Check if type is already registered
176+ // Check if type info is available
177177 if (discovery_database_->operator [](topic_name).second == false )
178178 {
179- WARNING (" Type " << topic_name << " has not been registered yet" );
179+ WARNING (" Type " << topic_name << " : info not available yet" );
180180 throw InconsistencyException (" Trying to create Data Reader in a non registered type: " + topic_name);
181181 }
182182
183183 // Check if type is registered or not in participant. If not, register it
184184 if (!participant_->find_type (type_name))
185185 {
186- // __FLAG__
187186 DEBUG (" Type info not registered in participant for topic " << topic_name);
188- // ////////////////////////
189187
190188 // Type information is available but not registered in participant
191189 // Types manually loaded (through XML file) are registered in participant when loaded, so this case is not possible
@@ -204,6 +202,7 @@ void Participant::create_subscription(
204202 dyn_type = DynamicTypeBuilderFactory::get_instance ()->create_type_w_type_object (
205203 type_object)->build ();
206204 TypeSupport dyn_type_support (new DynamicPubSubType (dyn_type));
205+ dyn_type_support->set_name (type_name);
207206 dyn_type_support.register_type (participant_);
208207 }
209208 else
@@ -307,9 +306,7 @@ void Participant::on_data_writer_discovery(
307306
308307 if (!info.type_information .assigned ())
309308 {
310- // __FLAG__
311309 DEBUG (" Type information not assigned for topic " << topic_name);
312- // ///////////////////////////
313310 // If type info is not assigned, check if it can be generated through a xml
314311 on_topic_discovery_ (topic_name, type_name);
315312 }
@@ -360,9 +357,7 @@ void Participant::on_topic_discovery_(
360357 const DataTypeId& type_id)
361358{
362359 // TODO: check if mutex required
363- // __FLAG__
364360 DEBUG (" Calling on_topic_discovery with type id for topic " << topic_name);
365- // ///////////////
366361 bool is_already_discovered = false ;
367362
368363 // Check if this topic has already been discovered
@@ -380,15 +375,9 @@ void Participant::on_topic_discovery_(
380375 if (!is_already_discovered)
381376 {
382377 // Add topic as discovered and save its type name and its type identifier to build DynamicType when DataReader is created
383- // __FLAG__
384378 DEBUG (" Topic " << topic_name << " discovered with type id" );
385- DEBUG (" Updating databases..." );
386- DEBUG (" ...Updating discovery database..." );
387379 discovery_database_->operator [](topic_name) = {type_name, true };
388- DEBUG (" ...Updating dynamic types info database..." );
389380 dyn_types_info_->operator [](topic_name) = {type_name, type_id};
390- DEBUG (" ...Databases updated" );
391- // ///////////////////////////////////////////
392381 }
393382
394383 // Call listener callback to notify new topic
0 commit comments