@@ -176,7 +176,7 @@ int fastdds_discovery_server(
176176 // Note there is a specific cast to pointer if the Option is valid
177177 option::Option* pOp = options[SERVERID ];
178178 int server_id = -1 ;
179- std::stringstream is ;
179+ std::stringstream server_stream ;
180180
181181 if (nullptr == pOp)
182182 {
@@ -203,8 +203,8 @@ int fastdds_discovery_server(
203203 else
204204 {
205205 // Cast of option to int has already been checked
206- is << pOp->arg ;
207- is >> server_id;
206+ server_stream << pOp->arg ;
207+ server_stream >> server_id;
208208 if (!eprosima::fastdds::rtps::get_server_client_default_guidPrefix (server_id,
209209 participantQos.wire_protocol ().prefix ))
210210 {
@@ -214,15 +214,15 @@ int fastdds_discovery_server(
214214 }
215215
216216 // Clear the std::stringstream state and reset it to an empty string
217- is .clear ();
218- is .str (" " );
217+ server_stream .clear ();
218+ server_stream .str (" " );
219219
220220 // Set Participant Name
221221 std::string server_name =
222222 (server_id == -1 ) ? " eProsima Guidless Server" : " eProsima Default Server" + std::to_string (
223223 server_id);
224- is << server_name;
225- participantQos.name (is .str ().c_str ());
224+ server_stream << server_name;
225+ participantQos.name (server_stream .str ().c_str ());
226226
227227 // Choose the kind of server to create
228228 pOp = options[BACKUP ];
@@ -260,10 +260,6 @@ int fastdds_discovery_server(
260260 option::Option* pO_port = options[UDP_PORT ];
261261 if (nullptr != pO_port)
262262 {
263- // if (eprosima::fastdds::dds::check_udp_port(*pO_port, true) != option::ARG_OK)
264- // {
265- // return 1;
266- // }
267263 std::stringstream is;
268264 is << pO_port->arg ;
269265 uint16_t id;
0 commit comments