aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-05-10 08:15:37 +0000
committerBart Polot <bart@net.in.tum.de>2013-05-10 08:15:37 +0000
commitbb9966e197621f0c118201553474df06083d93e1 (patch)
treeaa99f79208ca29dab98f45c7a7c87549b0b75efb /src
parente9c1e7db7bc40fd0e78a46154f3069c2961761cd (diff)
downloadgnunet-bb9966e197621f0c118201553474df06083d93e1.tar.gz
gnunet-bb9966e197621f0c118201553474df06083d93e1.zip
- clean up
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh-new.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mesh/gnunet-service-mesh-new.c b/src/mesh/gnunet-service-mesh-new.c
index b3d0f9936..e34fb9c0e 100644
--- a/src/mesh/gnunet-service-mesh-new.c
+++ b/src/mesh/gnunet-service-mesh-new.c
@@ -2633,7 +2633,6 @@ tunnel_send_fwd_ack (struct MeshTunnel *t, uint16_t type)
2633 switch (type) 2633 switch (type)
2634 { 2634 {
2635 case GNUNET_MESSAGE_TYPE_MESH_UNICAST: 2635 case GNUNET_MESSAGE_TYPE_MESH_UNICAST:
2636 case GNUNET_MESSAGE_TYPE_MESH_MULTICAST:
2637 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2636 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2638 "ACK due to FWD DATA retransmission\n"); 2637 "ACK due to FWD DATA retransmission\n");
2639 if (GNUNET_YES == t->nobuffer) 2638 if (GNUNET_YES == t->nobuffer)
@@ -2963,8 +2962,7 @@ tunnel_cancel_queues (void *cls, GNUNET_PEER_Id neighbor_id)
2963 next = pq->next; 2962 next = pq->next;
2964 if (pq->tunnel == t) 2963 if (pq->tunnel == t)
2965 { 2964 {
2966 if (GNUNET_MESSAGE_TYPE_MESH_MULTICAST == pq->type || 2965 if (GNUNET_MESSAGE_TYPE_MESH_UNICAST == pq->type ||
2967 GNUNET_MESSAGE_TYPE_MESH_UNICAST == pq->type ||
2968 GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN == pq->type) 2966 GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN == pq->type)
2969 { 2967 {
2970 // Should have been removed on destroy children 2968 // Should have been removed on destroy children
@@ -3814,8 +3812,7 @@ queue_add (void *cls, uint16_t type, size_t size,
3814 unsigned int *n; 3812 unsigned int *n;
3815 3813
3816 n = NULL; 3814 n = NULL;
3817 if (GNUNET_MESSAGE_TYPE_MESH_UNICAST == type || 3815 if (GNUNET_MESSAGE_TYPE_MESH_UNICAST == type)
3818 GNUNET_MESSAGE_TYPE_MESH_MULTICAST == type)
3819 { 3816 {
3820 n = &t->fwd_queue_n; 3817 n = &t->fwd_queue_n;
3821 max = &t->fwd_queue_max; 3818 max = &t->fwd_queue_max;
@@ -5004,9 +5001,9 @@ handle_local_new_client (void *cls, struct GNUNET_SERVER_Client *client,
5004/** 5001/**
5005 * Handler for requests of new tunnels 5002 * Handler for requests of new tunnels
5006 * 5003 *
5007 * @param cls closure 5004 * @param cls Closure.
5008 * @param client identification of the client 5005 * @param client Identification of the client.
5009 * @param message the actual message 5006 * @param message The actual message.
5010 */ 5007 */
5011static void 5008static void
5012handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client, 5009handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client,
@@ -5058,17 +5055,16 @@ handle_local_tunnel_create (void *cls, struct GNUNET_SERVER_Client *client,
5058 5055
5059 while (NULL != tunnel_get_by_pi (myid, next_tid)) 5056 while (NULL != tunnel_get_by_pi (myid, next_tid))
5060 next_tid = (next_tid + 1) & ~GNUNET_MESH_LOCAL_TUNNEL_ID_CLI; 5057 next_tid = (next_tid + 1) & ~GNUNET_MESH_LOCAL_TUNNEL_ID_CLI;
5061 t = tunnel_new (myid, next_tid++, c, tid); 5058 t = tunnel_new (myid, next_tid, c, tid);
5059 next_tid = (next_tid + 1) & ~GNUNET_MESH_LOCAL_TUNNEL_ID_CLI;
5062 if (NULL == t) 5060 if (NULL == t)
5063 { 5061 {
5064 GNUNET_break (0); 5062 GNUNET_break (0);
5065 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 5063 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
5066 return; 5064 return;
5067 } 5065 }
5068 next_tid = next_tid & ~GNUNET_MESH_LOCAL_TUNNEL_ID_CLI;
5069 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CREATED TUNNEL %s [%x] (%x)\n", 5066 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CREATED TUNNEL %s [%x] (%x)\n",
5070 GNUNET_i2s (&my_full_id), t->id.tid, t->local_tid); 5067 GNUNET_i2s (&my_full_id), t->id.tid, t->local_tid);
5071 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "new tunnel created\n");
5072 5068
5073 peer_info = peer_get (&t_msg->peer); 5069 peer_info = peer_get (&t_msg->peer);
5074 GNUNET_array_append (peer_info->tunnels, peer_info->ntunnels, t); 5070 GNUNET_array_append (peer_info->tunnels, peer_info->ntunnels, t);