gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35790 - gnunet/src/vpn


From: gnunet
Subject: [GNUnet-SVN] r35790 - gnunet/src/vpn
Date: Fri, 22 May 2015 15:33:29 +0200

Author: grothoff
Date: 2015-05-22 15:33:29 +0200 (Fri, 22 May 2015)
New Revision: 35790

Modified:
   gnunet/src/vpn/gnunet-service-vpn.c
Log:
-log conclusion of exit search

Modified: gnunet/src/vpn/gnunet-service-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-service-vpn.c 2015-05-22 13:27:02 UTC (rev 35789)
+++ gnunet/src/vpn/gnunet-service-vpn.c 2015-05-22 13:33:29 UTC (rev 35790)
@@ -693,6 +693,36 @@
 
 
 /**
+ * Output destination of a channel for diagnostics.
+ *
+ * @param de destination to process
+ * @return diagnostic string describing destination
+ */
+static const char *
+print_channel_destination (const struct DestinationEntry *de)
+{
+  static char dest[256];
+
+  if (de->is_service)
+  {
+    GNUNET_snprintf (dest,
+                     sizeof (dest),
+                     "HS: %s-%s\n",
+                     GNUNET_i2s (&de->details.service_destination.target),
+                     GNUNET_h2s 
(&de->details.service_destination.service_descriptor));
+  }
+  else
+  {
+    inet_ntop (de->details.exit_destination.af,
+               &de->details.exit_destination.ip,
+               dest,
+               sizeof (dest));
+  }
+  return dest;
+}
+
+
+/**
  * Regex has found a potential exit peer for us; consider using it.
  *
  * @param cls the 'struct ChannelState'
@@ -715,6 +745,9 @@
 
   GNUNET_REGEX_search_cancel (ts->search);
   ts->search = NULL;
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+              "Exit search for destination %s complete!\n",
+              print_channel_destination (&ts->destination),
   switch (ts->af)
   {
   case AF_INET:
@@ -816,7 +849,8 @@
       GNUNET_TUN_ipv6toregexsearch 
(&dt->destination->details.exit_destination.ip.v6,
                                    dt->destination_port,
                                     address);
-      GNUNET_asprintf (&policy, "%s%s",
+      GNUNET_asprintf (&policy,
+                       "%s%s",
                        GNUNET_APPLICATION_TYPE_EXIT_REGEX_PREFIX,
                        address);
       break;
@@ -858,36 +892,6 @@
 
 
 /**
- * Output destination of a channel for diagnostics.
- *
- * @param de destination to process
- * @return diagnostic string describing destination
- */
-static const char *
-print_channel_destination (const struct DestinationEntry *de)
-{
-  static char dest[256];
-
-  if (de->is_service)
-  {
-    GNUNET_snprintf (dest,
-                     sizeof (dest),
-                     "HS: %s-%s\n",
-                     GNUNET_i2s (&de->details.service_destination.target),
-                     GNUNET_h2s 
(&de->details.service_destination.service_descriptor));
-  }
-  else
-  {
-    inet_ntop (de->details.exit_destination.af,
-               &de->details.exit_destination.ip,
-               dest,
-               sizeof (dest));
-  }
-  return dest;
-}
-
-
-/**
  * Route a packet via cadet to the given destination.
  *
  * @param destination description of the destination




reply via email to

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