From: Nathan S. Evans Date: Wed, 3 Feb 2010 12:00:58 +0000 (+0000) Subject: coverity bugfix X-Git-Tag: initial-import-from-subversion-38251~22805 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cb3cae418d620e523db553f7607832531a58ed71;p=oweals%2Fgnunet.git coverity bugfix --- diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 6fb1f0b38..f43094499 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -2385,6 +2385,12 @@ static int handle_ping(void *cls, const struct GNUNET_MessageHeader *message, if (peer_address == NULL) peer_address = add_peer_address(n, sender_address, sender_address_len); + peer_address->timeout = GNUNET_TIME_relative_to_absolute(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); + + /* We don't use the peer_address because the address we received the message from may not + * be a reliable way to send it back! We add it to the list which should queue up a separate + * ping to determine if the address is viable. + */ transmit_to_peer(NULL, NULL, TRANSPORT_DEFAULT_PRIORITY, (char *)pong, ntohs(pong->header.size), GNUNET_NO, n); GNUNET_free(pong);