Skip to content

Commit 4036d98

Browse files
committed
Fix typo and improve debug message
1 parent cb3e89c commit 4036d98

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

ACE/ace/Ping_Socket.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ ACE_Ping_Socket::process_incoming_dgram (char * ptr, ssize_t len)
270270
if (ACE::debug())
271271
ACELIB_DEBUG
272272
((LM_DEBUG,
273-
ACE_TEXT ("(%P|%t) ACE::Ping_Socket::process_incoming_dgram - ")
273+
ACE_TEXT ("(%P|%t) ACE_Ping_Socket::process_incoming_dgram - ")
274274
ACE_TEXT ("received ")
275275
ACE_TEXT ("ICMP datagram with length of %b bytes (not counting ")
276276
ACE_TEXT ("IP-header): seq=%u, ttl=%d.\n"),
@@ -282,7 +282,7 @@ ACE_Ping_Socket::process_incoming_dgram (char * ptr, ssize_t len)
282282
if (ACE::debug())
283283
ACELIB_DEBUG
284284
((LM_DEBUG,
285-
ACE_TEXT ("(%P|%t) ACE::Ping_Socket::process_incoming_dgram - ")
285+
ACE_TEXT ("(%P|%t) ACE_Ping_Socket::process_incoming_dgram - ")
286286
ACE_TEXT ("received datagram that is not ICMP_ECHOREPLY.\n")));
287287

288288
return -1;
@@ -358,16 +358,15 @@ ACE_Ping_Socket::make_echo_check (ACE_INET_Addr & remote_addr,
358358
bool to_connect,
359359
ACE_Time_Value const * timeout)
360360
{
361-
int rval_send = -1;
361+
const int rval_send = this->send_echo_check (remote_addr, to_connect);
362362

363-
if ((rval_send = this->send_echo_check (remote_addr,
364-
to_connect)) == -1)
363+
if (rval_send == -1)
365364
return -1;
366365

367366
if (ACE::debug())
368367
ACELIB_DEBUG
369368
((LM_DEBUG,
370-
ACE_TEXT ("(%P|%t) ACE_Ping_Socket::make_echo_check - sent %d.\n"),
369+
ACE_TEXT ("(%P|%t) ACE_Ping_Socket::make_echo_check - sent %d bytes.\n"),
371370
rval_send));
372371

373372
return this->receive_echo_reply (timeout);

0 commit comments

Comments
 (0)