You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
* @author Martin Schanzenbach
*/
#include "platform.h"
+#if HAVE_CURL_CURL_H
#include <curl/curl.h>
+#elif HAVE_GNURL_CURL_H
+#include <gnurl/curl.h>
+#endif
#include <microhttpd.h>
#include "gnunet_namestore_service.h"
#include "gnunet_gns_service.h"
static void
-curl_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+curl_task (void *cls)
{
curl_task_id = NULL;
curl_main ();
NULL);
}
+
static void
-start_curl (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+start_curl (void *cls)
{
GNUNET_asprintf (&url,
- "http://%s:%d/hello_world",
+ "http://%s:%d/hello_world",
TEST_DOMAIN, PORT);
curl = curl_easy_init ();
curl_easy_setopt (curl, CURLOPT_URL, url);
curl_main ();
}
+
static void
-disco_ns (void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+disco_ns (void* cls)
{
GNUNET_NAMESTORE_disconnect (namestore);
}
+
/**
* Callback invoked from the namestore service once record is
* created.
* specified target peer; NULL on error
*/
static void
-commence_testing (void *cls, int32_t success, const char *emsg)
+commence_testing (void *cls,
+ int32_t success,
+ const char *emsg)
{
GNUNET_SCHEDULER_add_now (&disco_ns, NULL);
- if ((emsg != NULL) && (GNUNET_YES != success))
+ if ( (emsg != NULL) && (GNUNET_YES != success) )
{
fprintf (stderr,
- "NS failed to create record %s\n", emsg);
+ "NS failed to create record %s\n",
+ emsg);
GNUNET_SCHEDULER_shutdown ();
return;
}
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1), start_curl, NULL);
-
+ curl_task_id =
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ &start_curl, NULL);
}
-
-
/**
* Function to keep the HTTP server running.
*/
static void
-mhd_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+mhd_task (void *cls)
{
mhd_task_id = NULL;
MHD_run (mhd);
}
/* end of test_gns_vpn.c */
-