From: Matthias Wachs Date: Thu, 12 Apr 2012 08:43:48 +0000 (+0000) Subject: - fix X-Git-Tag: initial-import-from-subversion-38251~13936 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bf390d7f1b532f2430ba48f24d96fcb4bf4cc0e0;p=oweals%2Fgnunet.git - fix --- diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index b0efb3941..942059c91 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c @@ -452,23 +452,25 @@ int map_ping_it (void *cls, { struct PeerContainer *pc = value; - if ((GNUNET_YES == pc->transport_connected) && (NULL == pc->th_ping)) - pc->th_ping = GNUNET_TRANSPORT_notify_transmit_ready(th, &pc->id, - sizeof (struct PING), UINT_MAX, - GNUNET_TIME_relative_get_forever(), &send_transport_ping_cb, pc); - else - GNUNET_break(0); - - if ((GNUNET_YES == pc->core_connected) && (NULL == pc->ch_ping)) - pc->ch_ping = GNUNET_CORE_notify_transmit_ready(ch, - GNUNET_NO, UINT_MAX, - GNUNET_TIME_relative_get_forever(), - &pc->id, - sizeof (struct PING), - send_core_ping_cb, pc); - else - GNUNET_break (0); + if (ping == GNUNET_YES) + { + if ((GNUNET_YES == pc->transport_connected) && (NULL == pc->th_ping)) + pc->th_ping = GNUNET_TRANSPORT_notify_transmit_ready(th, &pc->id, + sizeof (struct PING), UINT_MAX, + GNUNET_TIME_relative_get_forever(), &send_transport_ping_cb, pc); + else + GNUNET_break(0); + if ((GNUNET_YES == pc->core_connected) && (NULL == pc->ch_ping)) + pc->ch_ping = GNUNET_CORE_notify_transmit_ready(ch, + GNUNET_NO, UINT_MAX, + GNUNET_TIME_relative_get_forever(), + &pc->id, + sizeof (struct PING), + send_core_ping_cb, pc); + else + GNUNET_break (0); + } return GNUNET_OK; }