static void
shutdown_clean ()
{
- struct Plugin_Address * cur;
struct Plugin_Address * tmp;
/* Evaluate results */
/* cleaning addresses */
while (addr_head != NULL)
{
- cur = addr_head;
tmp = addr_head->next;
GNUNET_free (addr_head->addr);
GNUNET_free (addr_head);
const struct GNUNET_PeerIdentity * target,
int result)
{
- struct Plugin_Address * tmp_addr;
- tmp_addr = addr_head;
-
if ((cls == &fail_msg_transmited_bigger_max_size) && (result == GNUNET_SYSERR))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message bigger max msg size was not sent!\n");
/* assertions before start */
GNUNET_assert ((port > 0) && (port <= 65535));
- GNUNET_assert(&my_public_key != NULL);
- GNUNET_assert(&my_identity.hashPubKey != NULL);
/* load plugins... */
setup_plugin_environment ();
GNUNET_asprintf (&libname, "libgnunet_plugin_transport_http");
- GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Loading HTTP transport plugin `%s'\n"),libname);
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Loading HTTP transport plugin `%s'\n"),
+ libname);
api = GNUNET_PLUGIN_load (libname, &env);
GNUNET_free (libname);
if (api == NULL)
/* testing plugin functionality */
GNUNET_assert (0!=fail_notify_address_count);
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transport plugin returned %u addresses to connect to\n", fail_notify_address_count);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Transport plugin returned %u addresses to connect to\n",
+ fail_notify_address_count);
/* testing pretty printer with all addresses obtained from the plugin*/
cur = addr_head;
while (cur != NULL)
{
-
- api->address_pretty_printer (api->cls, "http",cur->addr,cur->addrlen, GNUNET_NO,TEST_TIMEOUT, &pretty_printer_cb,NULL);
+ api->address_pretty_printer (api->cls, "http",
+ cur->addr,cur->addrlen, GNUNET_NO,TEST_TIMEOUT,
+ &pretty_printer_cb, NULL);
addr_str = api->address_to_string (api->cls, cur->addr, cur->addrlen);
suggest_res = api->check_address (api->cls, cur->addr, cur->addrlen);
"testcase", options, &run, NULL)) ? GNUNET_NO : GNUNET_YES;
GNUNET_DISK_directory_remove ("/tmp/test_gnunet_transport_plugin_http");
-
+ if (ret != GNUNET_OK)
+ return 1;
return fail;
}
Boston, MA 02111-1307, USA.
*/
/**
- * @file transport/test_gnunet_transport_plugin.https.c
- * @brief testcase for gnunet_transport_plugin.https.c
+ * @file transport/test_plugin_transport_https.c
+ * @brief testcase for plugin_transport_https.c
* @author Matthias Wachs
*/
static void
shutdown_clean ()
{
- struct Plugin_Address * cur;
struct Plugin_Address * tmp;
/* Evaluate results */
/* cleaning addresses */
while (addr_head != NULL)
{
- cur = addr_head;
tmp = addr_head->next;
GNUNET_free (addr_head->addr);
GNUNET_free (addr_head);
const struct GNUNET_PeerIdentity * target,
int result)
{
- struct Plugin_Address * tmp_addr;
- tmp_addr = addr_head;
-
if ((cls == &fail_msg_transmited_bigger_max_size) && (result == GNUNET_SYSERR))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message bigger max msg size was not sent!\n");
/* assertions before start */
GNUNET_assert ((port > 0) && (port <= 65535));
- GNUNET_assert(&my_public_key != NULL);
- GNUNET_assert(&my_identity.hashPubKey != NULL);
/* load plugins... */
setup_plugin_environment ();
"test_gnunet_transport_plugin.https",
"testcase", options, &run, NULL)) ? GNUNET_NO : GNUNET_YES;
- GNUNET_DISK_directory_remove ("/tmp/test_gnunet_transport_plugin.https");
-
+ GNUNET_DISK_directory_remove ("/tmp/test_gnunet_transport_plugin.https");
+ if (GNUNET_OK != ret)
+ return 1;
return fail;
}
-/* end of test_gnunet_transport_plugin.http.c */
+/* end of test_plugin_transport_https.c */