@@ -483,24 +483,27 @@ class ShapeOptions {
483483 if (!coherent_set_enabled && !ordered_access_enabled && coherent_set_access_scope_set) {
484484 logger.log_message (" warning: --access-scope ignored because not coherent, or ordered access enabled" , Verbosity::ERROR);
485485 }
486+ if (size_modulo > 0 && shapesize != 0 ) {
487+ logger.log_message (" warning: --size-modulo has no effect unless shapesize (-z) is set to 0" , Verbosity::ERROR);
488+ }
489+ if (subscribe && color != NULL && cft_expression != NULL ) {
490+ logger.log_message (" error: cannot specify both --cft and -c for subscriber applications" , Verbosity::ERROR);
491+ return false ;
492+ }
493+
486494#if defined(RTI_CONNEXT_MICRO)
487- if (!publish && color != NULL ) {
488- free (color);
495+ if (subscribe && ( color != NULL || cft_expression != NULL ) ) {
496+ STRING_FREE (color);
489497 color = NULL ;
498+ STRING_FREE (cft_expression);
499+ cft_expression = NULL ;
490500 logger.log_message (" warning: content filtered topic not supported, normal topic used" , Verbosity::ERROR);
491501 }
492- if (!publish && take_read_next_instance == true ) {
502+ if (subscribe && take_read_next_instance == true ) {
493503 take_read_next_instance = false ;
494504 logger.log_message (" warning: use of take/read_next_instance() not available, using take/read()" , Verbosity::ERROR);
495505 }
496506#endif
497- if (size_modulo > 0 && shapesize != 0 ) {
498- logger.log_message (" warning: --size-modulo has no effect unless shapesize (-z) is set to 0" , Verbosity::ERROR);
499- }
500- if (subscribe && color != NULL && cft_expression != NULL ) {
501- logger.log_message (" error: cannot specify both --cft and -c/--color for subscriber applications" , Verbosity::ERROR);
502- return false ;
503- }
504507
505508 return true ;
506509 }
@@ -1682,7 +1685,7 @@ class ShapeApplication {
16821685 }
16831686
16841687 if ( options->cft_expression != NULL || options->color != NULL ) {
1685- /* For Connext Micro color will be always NULL */
1688+ /* For Connext Micro color and cft_expression will be always NULL */
16861689#if !defined(RTI_CONNEXT_MICRO)
16871690 /* filter on specified color */
16881691 ContentFilteredTopic *cft = NULL ;
0 commit comments