-improve indentation, reduce duplication of PIDs in core's neighbour map
[oweals/gnunet.git] / src / transport / gnunet-service-transport_validation.c
index ee8cd93089bde54864470c6b1175d66cbe31feab..314eefaec2fb7d25dd7a80ab0b8d9373ea7b4f55 100644 (file)
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 
 /**
@@ -1434,7 +1434,9 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
   {
     /* We have a cached and valid signature for this peer,
      * try to compare instead of verify */
-    if (0 == memcmp (&ve->pong_sig_cache, &pong->signature, sizeof (struct GNUNET_CRYPTO_EddsaSignature)))
+    if (0 == memcmp (&ve->pong_sig_cache,
+                     &pong->signature,
+                     sizeof (struct GNUNET_CRYPTO_EddsaSignature)))
     {
       /* signatures are identical, we can skip verification */
       sig_res = GNUNET_OK;
@@ -1451,7 +1453,8 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
   {
     /* Do expensive verification */
     sig_res = GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
-                                          &pong->purpose, &pong->signature,
+                                          &pong->purpose,
+                                          &pong->signature,
                                           &ve->address->peer.public_key);
     if (sig_res == GNUNET_SYSERR)
     {
@@ -1482,7 +1485,7 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
   ve->expecting_pong = GNUNET_NO;
   ve->valid_until = GNUNET_TIME_relative_to_absolute (HELLO_ADDRESS_EXPIRATION);
   ve->pong_sig_cache = pong->signature;
-       ve->pong_sig_valid_until = GNUNET_TIME_absolute_ntoh (pong->expiration);
+  ve->pong_sig_valid_until = GNUNET_TIME_absolute_ntoh (pong->expiration);
   ve->latency = GNUNET_TIME_absolute_get_duration (ve->send_time);
   {
     if (GNUNET_YES == ve->known_to_ats)
@@ -1524,10 +1527,10 @@ GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
   /* build HELLO to store in PEERINFO */
   ve->copied = GNUNET_NO;
   hello = GNUNET_HELLO_create (&ve->address->peer.public_key,
-                               &add_valid_peer_address, 
+                               &add_valid_peer_address,
                               ve,
                                GNUNET_NO);
-  GNUNET_PEERINFO_add_peer (GST_peerinfo, 
+  GNUNET_PEERINFO_add_peer (GST_peerinfo,
                            hello,
                            NULL,
                            NULL);
@@ -1549,7 +1552,6 @@ GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello)
   const struct GNUNET_HELLO_Message *hm =
       (const struct GNUNET_HELLO_Message *) hello;
   struct GNUNET_PeerIdentity pid;
-  struct GNUNET_HELLO_Message *h;
   int friend;
 
   friend = GNUNET_HELLO_is_friend_only (hm);