[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r17152 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r17152 - gnunet/src/mesh |
Date: |
Mon, 3 Oct 2011 19:01:14 +0200 |
Author: bartpolot
Date: 2011-10-03 19:01:14 +0200 (Mon, 03 Oct 2011)
New Revision: 17152
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed size request from core on create path and path ack, reformatted call to
make more readable
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2011-10-03 16:35:16 UTC (rev
17151)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2011-10-03 17:01:14 UTC (rev
17152)
@@ -1228,7 +1228,8 @@
GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
GNUNET_TIME_UNIT_FOREVER_REL,
path_get_first_hop (t->tree, peer->id),
- size_needed, &send_core_create_path,
+ size_needed,
+ &send_core_create_path,
info);
return 0;
}
@@ -1247,6 +1248,9 @@
path_destroy (p);
GNUNET_free (info);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "MESH: %u bytes long create path sent!\n",
+ size_needed);
return size_needed;
}
@@ -1656,7 +1660,7 @@
info->peer->core_transmit[j] =
GNUNET_CORE_notify_transmit_ready (core_handle, 0, 100,
GNUNET_TIME_UNIT_FOREVER_REL, peer,
- sizeof (struct
GNUNET_MessageHeader),
+ sizeof (struct GNUNET_MESH_PathACK),
&send_core_path_ack, info);
}
else
@@ -1671,10 +1675,16 @@
path_add_to_peer (dest_peer_info, path);
GNUNET_PEER_resolve (path->peers[own_pos + 1], &id);
- GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
- GNUNET_TIME_UNIT_FOREVER_REL, &id,
- sizeof (struct GNUNET_MessageHeader),
- &send_core_create_path, path_info);
+ GNUNET_CORE_notify_transmit_ready (
+ core_handle,
+ 0,
+ 0,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &id,
+ sizeof (struct GNUNET_MESH_ManipulatePath) +
+ path->length * sizeof(struct GNUNET_PeerIdentity),
+ &send_core_create_path,
+ path_info);
}
return GNUNET_OK;
}
@@ -2717,12 +2727,16 @@
peer_info->infos[i] = path_info;
peer_info->types[i] = GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE;
peer_info->core_transmit[i] =
- GNUNET_CORE_notify_transmit_ready (core_handle, 0, 0,
- GNUNET_TIME_UNIT_FOREVER_REL,
- path_get_first_hop(t->tree,
-
path_info->peer->id),
- sizeof (struct GNUNET_MessageHeader),
- &send_core_create_path, path_info);
+ GNUNET_CORE_notify_transmit_ready (
+ core_handle,
+ 0,
+ 0,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ path_get_first_hop(t->tree, path_info->peer->id),
+ sizeof (struct GNUNET_MESH_ManipulatePath)
+ + path_info->path->length * sizeof(struct GNUNET_PeerIdentity),
+ &send_core_create_path,
+ path_info);
}
/* Otherwise: there is no path yet, but there is a DHT_get active already. */
GNUNET_SERVER_receive_done (client, GNUNET_OK);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r17152 - gnunet/src/mesh,
gnunet <=