+ struct GNUNET_CONFIGURATION_Handle *cfg;
+ char *section;
+ char *peer_str;
+ cfg = GNUNET_CONFIGURATION_create ();
+ if (GNUNET_OK != GNUNET_CONFIGURATION_load (cfg, cfg_file))
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Could not load configuration `%s'\n", cfg_file);
+ GNUNET_CONFIGURATION_destroy (cfg);
+ return GNUNET_SYSERR;
+ }
+
+ peer_str = GNUNET_strdup (GNUNET_i2s_full(peer));
+ GNUNET_asprintf (§ion, "transport-blacklist-%s", peer_str);
+
+ if (GNUNET_NO == GNUNET_CONFIGURATION_have_value (cfg, section, GNUNET_i2s_full(bl_peer)))
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
+ "Configuration `%s' does not have blacklisting section for peer `%s' blacklisting `%s'\n",
+ cfg_file, peer_str, GNUNET_i2s_full(bl_peer));
+ GNUNET_CONFIGURATION_destroy (cfg);
+ GNUNET_free (section);
+ GNUNET_free (peer_str);
+ return GNUNET_SYSERR;
+ }
+
+ GNUNET_log(GNUNET_ERROR_TYPE_INFO,
+ "Configuration `%s' does have blacklisting section for peer `%s' blacklisting `%s'\n",
+ cfg_file, peer_str, GNUNET_i2s_full(bl_peer));
+
+ GNUNET_CONFIGURATION_destroy (cfg);
+ GNUNET_free (section);
+ GNUNET_free (peer_str);