if (GMC_is_pid_bigger (pid, t->prev_fc.last_pid_recv)
&&
(GNUNET_NO == t->reliable ||
- GNUNET_ntohll (msg->mid) == (t->bck_rel->mid_recv + 1)) )
+ (GNUNET_ntohll (msg->mid) == (t->bck_rel->mid_recv + 1) &&
+ t->bck_rel->mid_recv++)
+ )
+ )
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
" pid %u not seen yet, forwarding\n", pid);
t->prev_fc.last_pid_recv = pid;
- t->bck_rel->mid_recv++;
tunnel_send_client_ucast (t, msg);
}
else
c->handle = client;
GNUNET_SERVER_client_keep (client);
GNUNET_SERVER_client_set_user_context (client, c);
+ GNUNET_CONTAINER_DLL_insert (clients_head, clients_tail, c);
}
c->id);
GNUNET_SERVER_client_drop (c->handle);
c->shutting_down = GNUNET_YES;
- GNUNET_CONTAINER_multihashmap32_iterate (c->own_tunnels,
- &tunnel_destroy_iterator, c);
- GNUNET_CONTAINER_multihashmap32_iterate (c->incoming_tunnels,
+ if (NULL != c->own_tunnels)
+ {
+ GNUNET_CONTAINER_multihashmap32_iterate (c->own_tunnels,
+ &tunnel_destroy_iterator, c);
+ GNUNET_CONTAINER_multihashmap32_destroy (c->own_tunnels);
+ }
+
+ if (NULL != c->incoming_tunnels)
+ {
+ GNUNET_CONTAINER_multihashmap32_iterate (c->incoming_tunnels,
&tunnel_destroy_iterator, c);
- GNUNET_CONTAINER_multihashmap32_destroy (c->own_tunnels);
- GNUNET_CONTAINER_multihashmap32_destroy (c->incoming_tunnels);
+ GNUNET_CONTAINER_multihashmap32_destroy (c->incoming_tunnels);
+ }
if (NULL != c->ports)
GNUNET_CONTAINER_multihashmap32_destroy (c->ports);
}
}
- GNUNET_CONTAINER_DLL_insert (clients_head, clients_tail, c);
c->own_tunnels = GNUNET_CONTAINER_multihashmap32_create (32);
c->incoming_tunnels = GNUNET_CONTAINER_multihashmap32_create (32);
GNUNET_SERVER_notification_context_add (nc, client);