2 #include "gnunet_util_lib.h"
3 #include "gnunet_mesh_service_new.h"
5 static struct GNUNET_MESH_MessageHandler handlers[] = {
9 int main (int argc, char *argv[]) {
10 struct GNUNET_OS_Process *arm_pid;
11 struct GNUNET_MESH_Handle *mesh;
12 // struct GNUNET_MESH_Tunnel *t;
13 struct GNUNET_CONFIGURATION_Handle *cfg;
15 cfg = GNUNET_CONFIGURATION_create();
17 arm_pid = GNUNET_OS_start_process (NULL, NULL,
22 mesh = GNUNET_MESH_connect(cfg, NULL, NULL, handlers, NULL);
24 fprintf(stderr, "Couldn't connect to mesh :(\n");
25 // return 1; // succeed anyway
27 mesh = realloc(mesh, 0); // don't complain about *mesh
28 // printf("MESH TEST\n");
29 // t = GNUNET_MESH_tunnel_create(mesh, );
31 /* do real test work here */
32 if (0 != GNUNET_OS_process_kill (arm_pid, SIGTERM))
33 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
34 GNUNET_assert (GNUNET_OK == GNUNET_OS_process_wait (arm_pid));
35 GNUNET_OS_process_close (arm_pid);