aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-03-30 12:26:58 +0000
committerBart Polot <bart@net.in.tum.de>2011-03-30 12:26:58 +0000
commit3612f20a379ee4b9e477e9990b47333aaba882de (patch)
tree15a2e42d8517ec26f02d3ef43aca20e881017681 /src/mesh
parentb65a354ccaaa682b861c69f5899669e70cba69cc (diff)
downloadgnunet-3612f20a379ee4b9e477e9990b47333aaba882de.tar.gz
gnunet-3612f20a379ee4b9e477e9990b47333aaba882de.zip
Changes to integrate mesh application_type re-definition
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh_api.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index d030f9f8f..12759f2a7 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -95,7 +95,7 @@ struct peer_list_element
95 unsigned int num_types; 95 unsigned int num_types;
96 96
97 /* array of message-types */ 97 /* array of message-types */
98 uint16_t *types; 98 GNUNET_MESH_ApplicationType *types;
99 99
100 struct GNUNET_TRANSPORT_ATS_Information atsi; 100 struct GNUNET_TRANSPORT_ATS_Information atsi;
101 struct peer_list_element *next, *prev; 101 struct peer_list_element *next, *prev;
@@ -314,10 +314,10 @@ receive_hello (void *cls,
314 } 314 }
315 315
316 element->num_types = *num; 316 element->num_types = *num;
317 element->types = GNUNET_malloc (*num * sizeof (uint16_t)); 317 element->types = GNUNET_malloc (*num * sizeof (GNUNET_MESH_ApplicationType));
318 318
319 for (i = 0; i < *num; i++) 319 for (i = 0; i < *num; i++)
320 element->types[i] = ntohs (ports[i]); 320 element->types[i] = (GNUNET_MESH_ApplicationType)ntohs (ports[i]);
321 321
322 struct tunnel_list_element *tunnel = handle->pending_by_type_tunnels.head; 322 struct tunnel_list_element *tunnel = handle->pending_by_type_tunnels.head;
323 while (tunnel != NULL) 323 while (tunnel != NULL)
@@ -423,7 +423,7 @@ core_receive (void *cls,
423struct GNUNET_MESH_Tunnel * 423struct GNUNET_MESH_Tunnel *
424GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *handle, 424GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *handle,
425 struct GNUNET_TIME_Relative timeout, 425 struct GNUNET_TIME_Relative timeout,
426 uint16_t message_type, 426 GNUNET_MESH_ApplicationType message_type,
427 GNUNET_MESH_TunnelConnectHandler 427 GNUNET_MESH_TunnelConnectHandler
428 connect_handler, 428 connect_handler,
429 GNUNET_MESH_TunnelDisconnectHandler 429 GNUNET_MESH_TunnelDisconnectHandler
@@ -632,7 +632,8 @@ GNUNET_MESH_connect (const struct
632 *cfg, void *cls, 632 *cfg, void *cls,
633 GNUNET_MESH_TunnelEndHandler 633 GNUNET_MESH_TunnelEndHandler
634 cleaner, 634 cleaner,
635 const struct GNUNET_MESH_MessageHandler *handlers) 635 const struct GNUNET_MESH_MessageHandler *handlers,
636 const GNUNET_MESH_ApplicationType *stypes)
636{ 637{
637 struct GNUNET_MESH_Handle *ret = 638 struct GNUNET_MESH_Handle *ret =
638 GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle)); 639 GNUNET_malloc (sizeof (struct GNUNET_MESH_Handle));