+ if (NULL == address.transport_name)
+ {
+ GNUNET_break (0);
+ }
+
+ if (0 != strstr (address.transport_name, "_client"))
+ {
+ plugin_name = GNUNET_strdup (address.transport_name);
+ pos = strstr (plugin_name, "_client");
+ GNUNET_assert (NULL != pos);
+ GNUNET_snprintf (pos, strlen ("_server") + 1, "%s", "_server");
+ }
+ else
+ plugin_name = GNUNET_strdup (address.transport_name);
+
+ if (NULL == (papi = GST_plugins_find (plugin_name)))
+ {
+ /* we don't have the plugin for this address */
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Plugin `%s' not available, cannot confirm having this address\n"),
+ plugin_name);
+ GNUNET_free (plugin_name);
+ return GNUNET_SYSERR;
+ }
+ GNUNET_free (plugin_name);
+ if (GNUNET_OK !=
+ papi->check_address (papi->cls,
+ addrend,
+ len_address))
+ {
+ GNUNET_STATISTICS_update (GST_stats,
+ gettext_noop
+ ("# failed address checks during validation"), 1,
+ GNUNET_NO);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Address `%s' is not one of my addresses, not confirming PING\n"),
+ GST_plugins_a2s (&address));
+ return GNUNET_SYSERR;
+ }
+ else
+ {
+ GNUNET_STATISTICS_update (GST_stats,
+ gettext_noop
+ ("# successful address checks during validation"), 1,
+ GNUNET_NO);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Address `%s' is one of my addresses, confirming PING\n",
+ GST_plugins_a2s (&address));
+ }