diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 2769793f9..d545d8dd3 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -710,8 +710,6 @@ handle_local_new_client (void *cls, | |||
710 | /* Create new client structure */ | 710 | /* Create new client structure */ |
711 | c = GNUNET_malloc(sizeof(struct Client)); | 711 | c = GNUNET_malloc(sizeof(struct Client)); |
712 | c->handle = client; | 712 | c->handle = client; |
713 | c->tunnels_head = NULL; | ||
714 | c->tunnels_tail = NULL; | ||
715 | if(payload_size != 0) { | 713 | if(payload_size != 0) { |
716 | c->messages_subscribed = GNUNET_malloc(payload_size); | 714 | c->messages_subscribed = GNUNET_malloc(payload_size); |
717 | memcpy(c->messages_subscribed, &message[1], payload_size); | 715 | memcpy(c->messages_subscribed, &message[1], payload_size); |
@@ -724,6 +722,7 @@ handle_local_new_client (void *cls, | |||
724 | GNUNET_CONTAINER_DLL_insert (clients_head, clients_tail, c); | 722 | GNUNET_CONTAINER_DLL_insert (clients_head, clients_tail, c); |
725 | 723 | ||
726 | GNUNET_SERVER_receive_done(client, GNUNET_OK); | 724 | GNUNET_SERVER_receive_done(client, GNUNET_OK); |
725 | |||
727 | } | 726 | } |
728 | 727 | ||
729 | /** | 728 | /** |
@@ -777,16 +776,6 @@ handle_local_tunnel_create (void *cls, | |||
777 | t = GNUNET_malloc(sizeof(struct MESH_tunnel)); | 776 | t = GNUNET_malloc(sizeof(struct MESH_tunnel)); |
778 | t->tid = ntohl(tunnel_msg->tunnel_id); | 777 | t->tid = ntohl(tunnel_msg->tunnel_id); |
779 | t->oid = myid; | 778 | t->oid = myid; |
780 | t->peers_ready = 0; | ||
781 | t->peers_total = 0; | ||
782 | t->peers_head = NULL; | ||
783 | t->peers_tail = NULL; | ||
784 | t->paths_head = NULL; | ||
785 | t->paths_tail = NULL; | ||
786 | t->in_head = NULL; | ||
787 | t->in_tail = NULL; | ||
788 | t->out_head = NULL; | ||
789 | t->out_tail = NULL; | ||
790 | t->client = c; | 779 | t->client = c; |
791 | 780 | ||
792 | GNUNET_CONTAINER_DLL_insert(c->tunnels_head, c->tunnels_tail, t); | 781 | GNUNET_CONTAINER_DLL_insert(c->tunnels_head, c->tunnels_tail, t); |
@@ -1319,7 +1308,7 @@ run (void *cls, | |||
1319 | struct GNUNET_SERVER_Handle *server, | 1308 | struct GNUNET_SERVER_Handle *server, |
1320 | const struct GNUNET_CONFIGURATION_Handle *c) | 1309 | const struct GNUNET_CONFIGURATION_Handle *c) |
1321 | { | 1310 | { |
1322 | 1311 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "******* MESH DEBUG MESSAGE 3 ********\n"); | |
1323 | GNUNET_SERVER_add_handlers (server, plugin_handlers); | 1312 | GNUNET_SERVER_add_handlers (server, plugin_handlers); |
1324 | GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL); | 1313 | GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, NULL); |
1325 | core_handle = GNUNET_CORE_connect (c, /* Main configuration */ | 1314 | core_handle = GNUNET_CORE_connect (c, /* Main configuration */ |
@@ -1334,11 +1323,10 @@ run (void *cls, | |||
1334 | NULL, /* Don't notify about all outbound messages */ | 1323 | NULL, /* Don't notify about all outbound messages */ |
1335 | GNUNET_NO, /* For header-only out notification */ | 1324 | GNUNET_NO, /* For header-only out notification */ |
1336 | core_handlers); /* Register these handlers */ | 1325 | core_handlers); /* Register these handlers */ |
1337 | 1326 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "******* MESH DEBUG MESSAGE 4 ********\n"); | |
1338 | if (core_handle == NULL) { | 1327 | if (core_handle == NULL) { |
1339 | GNUNET_break(0); | 1328 | GNUNET_break(0); |
1340 | } | 1329 | } |
1341 | |||
1342 | dht_handle = GNUNET_DHT_connect(c, 100); /* FIXME ht len correct size? */ | 1330 | dht_handle = GNUNET_DHT_connect(c, 100); /* FIXME ht len correct size? */ |
1343 | if (dht_handle == NULL) { | 1331 | if (dht_handle == NULL) { |
1344 | GNUNET_break(0); | 1332 | GNUNET_break(0); |
@@ -1356,12 +1344,13 @@ int | |||
1356 | main (int argc, char *const *argv) | 1344 | main (int argc, char *const *argv) |
1357 | { | 1345 | { |
1358 | int ret; | 1346 | int ret; |
1359 | 1347 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "******* MESH DEBUG MESSAGE 1 ********\n"); | |
1360 | ret = (GNUNET_OK == | 1348 | ret = (GNUNET_OK == |
1361 | GNUNET_SERVICE_run (argc, | 1349 | GNUNET_SERVICE_run (argc, |
1362 | argv, | 1350 | argv, |
1363 | "mesh", | 1351 | "mesh", |
1364 | GNUNET_SERVICE_OPTION_NONE, | 1352 | GNUNET_SERVICE_OPTION_NONE, |
1365 | &run, NULL)) ? 0 : 1; | 1353 | &run, NULL)) ? 0 : 1; |
1354 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "******* MESH DEBUG MESSAGE 2 ********\n"); | ||
1366 | return ret; | 1355 | return ret; |
1367 | } | 1356 | } |