mantis #1844
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 24 Oct 2011 09:37:02 +0000 (09:37 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 24 Oct 2011 09:37:02 +0000 (09:37 +0000)
src/transport/gnunet-service-transport_validation.c

index 963115668a9b0537e07819760ffb2ff0527ee6d7..71acd1181e438fdad14eb1ebda5fd0f18b4454f4 100644 (file)
@@ -604,6 +604,10 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
   alen = ntohs (hdr->size) - sizeof (struct TransportPingMessage);
   /* peer wants to confirm that this is one of our addresses, this is what is
    * used for address validation */
+
+  sig_cache = NULL;
+  sig_cache_exp = NULL;
+
   if (0 < alen)
   {
     addrend = memchr (addr, '\0', alen);
@@ -630,6 +634,11 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
   {
     addrend = NULL; /* make gcc happy */
     slen = 0;
+    static struct GNUNET_CRYPTO_RsaSignature no_address_signature;
+    static struct GNUNET_TIME_Absolute no_address_signature_expiration;
+
+    sig_cache = &no_address_signature;
+    sig_cache_exp = &no_address_signature_expiration;
   }
 
   pong = GNUNET_malloc (sizeof (struct TransportPongMessage) + alen + slen);