Author: grothoff Date: 2008-02-22 22:52:46 -0700 (Fri, 22 Feb 2008) New Revision: 6419
Modified: GNUnet/src/applications/bootstrap_http/http.c GNUnet/src/applications/bootstrap_http/httptest.c Log: fix Modified: GNUnet/src/applications/bootstrap_http/http.c =================================================================== --- GNUnet/src/applications/bootstrap_http/http.c 2008-02-23 05:19:05 UTC (rev 6418) +++ GNUnet/src/applications/bootstrap_http/http.c 2008-02-23 05:52:46 UTC (rev 6419) @@ -227,9 +227,13 @@ protocols = 0; for (i = GNUNET_TRANSPORT_PROTOCOL_NUMBER_MAX; i > GNUNET_TRANSPORT_PROTOCOL_NUMBER_NAT; i--) - if (transport->isAvailable ((unsigned short) i)) - protocols |= (1LL << i); - sprintf (purl, "%s&p=%llu", url, protocols); + { + if (transport == NULL) + protocols |= (1LL << i); + else if (transport->isAvailable ((unsigned short) i)) + protocols |= (1LL << i); + } + sprintf (purl, "%s?p=%llu", url, protocols); GNUNET_free (url); url = purl; bctx.url = url; @@ -406,8 +410,6 @@ coreAPI = capi; ectx = capi->ectx; transport = coreAPI->request_service ("transport"); - if (transport == NULL) - return NULL; stats = coreAPI->request_service ("stats"); if (stats != NULL) { @@ -423,7 +425,8 @@ { if (stats != NULL) coreAPI->release_service (stats); - coreAPI->release_service (transport); + if (transport != NULL) + coreAPI->release_service (transport); transport = NULL; coreAPI = NULL; } Modified: GNUnet/src/applications/bootstrap_http/httptest.c =================================================================== --- GNUnet/src/applications/bootstrap_http/httptest.c 2008-02-23 05:19:05 UTC (rev 6418) +++ GNUnet/src/applications/bootstrap_http/httptest.c 2008-02-23 05:52:46 UTC (rev 6419) @@ -92,7 +92,7 @@ NULL, "GNUNETD", "HOSTLISTURL", - "http://gnunet.org/hostlist"); + "http://gnunet.org/hostlist.php"); memset (&capi, 0, sizeof (GNUNET_CoreAPIForPlugins)); capi.cfg = cfg; capi.request_service = &rs; @@ -101,11 +101,15 @@ init = GNUNET_plugin_resolve_function (plugin, "provide_module_", GNUNET_YES); boot = init (&capi); - p = GNUNET_thread_create (&pt, boot, 1024 * 64); - GNUNET_thread_join (p, &unused); - done = - GNUNET_plugin_resolve_function (plugin, "release_module_", GNUNET_YES); - done (); + if (boot != NULL) + { + p = GNUNET_thread_create (&pt, boot, 1024 * 64); + GNUNET_thread_join (p, &unused); + done = + GNUNET_plugin_resolve_function (plugin, "release_module_", GNUNET_YES); + if (done != NULL) + done (); + } GNUNET_plugin_unload (plugin); GNUNET_GC_free (cfg); if (count == 0) _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn