gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r5678 - GNUnet/src/applications/advertising


From: gnunet
Subject: [GNUnet-SVN] r5678 - GNUnet/src/applications/advertising
Date: Sat, 29 Sep 2007 21:31:19 -0600 (MDT)

Author: grothoff
Date: 2007-09-29 21:31:18 -0600 (Sat, 29 Sep 2007)
New Revision: 5678

Modified:
   GNUnet/src/applications/advertising/advertising.c
   GNUnet/src/applications/advertising/advertising_test.c
Log:
better ports, better debug stuff

Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c   2007-09-30 03:30:11 UTC 
(rev 5677)
+++ GNUnet/src/applications/advertising/advertising.c   2007-09-30 03:31:18 UTC 
(rev 5678)
@@ -243,6 +243,15 @@
       identity->addHost (msg);
       if (stats != NULL)
         stats->change (stat_hello_nat_in, 1);
+#if DEBUG_ADVERTISING
+      IF_GELOG (ectx,
+               GE_INFO | GE_REQUEST | GE_USER,
+               hash2enc (&msg->senderIdentity.hashPubKey, &enc));
+      GE_LOG (ectx,
+             GE_INFO | GE_REQUEST | GE_USER,
+             "HELLO advertisement from `%s' for NAT, no verification 
required.\n",
+             &enc);
+#endif
       return OK;
     }
 
@@ -266,6 +275,15 @@
           if (stats != NULL)
             stats->change (stat_hello_update, 1);
           FREE (copy);
+#if DEBUG_ADVERTISING
+         IF_GELOG (ectx,
+                   GE_INFO | GE_REQUEST | GE_USER,
+                   hash2enc (&msg->senderIdentity.hashPubKey, &enc));
+         GE_LOG (ectx,
+                 GE_INFO | GE_REQUEST | GE_USER,
+                 "HELLO advertisement from `%s' for protocol %d updates old 
advertisement, no verification required.\n",
+                 &enc, ntohs (msg->protocol));
+#endif
           return OK;
         }
 #if DEBUG_ADVERTISING
@@ -347,6 +365,15 @@
     {
       if (stats != NULL)
         stats->change (stat_hello_no_transport, 1);
+#if DEBUG_ADVERTISING
+      IF_GELOG (ectx,
+               GE_INFO | GE_REQUEST | GE_USER,
+               hash2enc (&msg->senderIdentity.hashPubKey, &enc));
+      GE_LOG (ectx,
+             GE_INFO | GE_REQUEST | GE_USER,
+             "Failed to connect to `%s'.  Verification failed.\n",
+             &enc);
+#endif
       return SYSERR;            /* could not connect */
     }
 
@@ -398,6 +425,15 @@
       if (stats != NULL)
         stats->change (stat_hello_noselfad, 1);
       transport->disconnect (tsession, __FILE__);
+#if DEBUG_ADVERTISING
+      IF_GELOG (ectx,
+               GE_INFO | GE_REQUEST | GE_USER,
+               hash2enc (&msg->senderIdentity.hashPubKey, &enc));
+      GE_LOG (ectx,
+             GE_INFO | GE_REQUEST | GE_USER,
+             "Failed to connect advertisement for myself.  Verification 
failed.\n",
+             &enc);
+#endif
       return SYSERR;
     }
   res = OK;
@@ -412,6 +448,15 @@
 
       if (stats != NULL)
         stats->change (stat_hello_send_error, 1);
+#if DEBUG_ADVERTISING
+      IF_GELOG (ectx,
+               GE_INFO | GE_REQUEST | GE_USER,
+               hash2enc (&msg->senderIdentity.hashPubKey, &enc));
+      GE_LOG (ectx,
+             GE_INFO | GE_REQUEST | GE_USER,
+             "Failed to transmit advertisement for myself.  Verification 
failed.\n",
+             &enc);
+#endif
       res = SYSERR;
     }
   if (res == OK)

Modified: GNUnet/src/applications/advertising/advertising_test.c
===================================================================
--- GNUnet/src/applications/advertising/advertising_test.c      2007-09-30 
03:30:11 UTC (rev 5677)
+++ GNUnet/src/applications/advertising/advertising_test.c      2007-09-30 
03:31:18 UTC (rev 5678)
@@ -83,7 +83,7 @@
   peers =
     gnunet_testing_start_daemons (strstr (argv[0], "_") + 1,
                                   "advertising stats",
-                                  "/tmp/gnunet-advertising-test", 2087, 10,
+                                  "/tmp/gnunet-advertising-test", 12087, 10,
                                   NUM_PEERS);
   if (peers == NULL)
     {
@@ -93,8 +93,8 @@
   /* do circular connect */
   for (i = 0; i < NUM_PEERS; i++)
     {
-      if (OK != gnunet_testing_connect_daemons (2087 + 10 * i,
-                                                2087 +
+      if (OK != gnunet_testing_connect_daemons (12087 + 10 * i,
+                                                12087 +
                                                 10 * ((i + 1) % NUM_PEERS)))
         {
           gnunet_testing_stop_daemons (peers);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]