[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22717 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22717 - gnunet/src/mesh |
Date: |
Tue, 17 Jul 2012 15:42:41 +0200 |
Author: bartpolot
Date: 2012-07-17 15:42:41 +0200 (Tue, 17 Jul 2012)
New Revision: 22717
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- fix #2498
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-07-17 12:58:15 UTC (rev
22716)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-07-17 13:42:41 UTC (rev
22717)
@@ -858,6 +858,20 @@
regex_find_path (const struct GNUNET_HashCode *key,
struct MeshRegexSearchContext *ctx);
+
+/**
+ * Queue and pass message to core when possible.
+ *
+ * @param cls Closure (type dependant).
+ * @param type Type of the message.
+ * @param size Size of the message.
+ * @param dst Neighbor to send message to.
+ * @param t Tunnel this message belongs to.
+ */
+static void
+queue_add (void *cls, uint16_t type, size_t size,
+ struct MeshPeerInfo *dst, struct MeshTunnel *t);
+
/******************************************************************************/
/************************ ITERATORS
****************************/
/******************************************************************************/
@@ -1773,7 +1787,7 @@
data_descriptor_decrement_multicast (struct MeshData *mesh_data)
{
/* Make sure it's a multicast packet */
- GNUNET_assert (NULL != mesh_data->reference_counter); // FIXME URGENT #2499
+ GNUNET_assert (NULL != mesh_data->reference_counter);
if (0 == --(*(mesh_data->reference_counter)))
{
@@ -1873,19 +1887,6 @@
/**
- * Queue and pass message to core when possible.
- *
- * @param cls Closure (type dependant).
- * @param type Type of the message.
- * @param size Size of the message.
- * @param dst Neighbor to send message to.
- * @param t Tunnel this message belongs to.
- */
-static void
-queue_add (void *cls, uint16_t type, size_t size,
- struct MeshPeerInfo *dst, struct MeshTunnel *t);
-
-/**
* Core callback to write a pre-constructed data packet to core buffer
*
* @param cls Closure (MeshTransmissionDescriptor with data in "data" member).
@@ -1944,6 +1945,8 @@
info->mesh_data->data = GNUNET_malloc (size);
memcpy (info->mesh_data->data, message, size);
info->mesh_data->data_len = size;
+ info->mesh_data->reference_counter = GNUNET_malloc (sizeof (unsigned int));
+ *info->mesh_data->reference_counter = 1;
neighbor = peer_info_get (peer);
for (p = neighbor->path_head; NULL != p; p = p->next)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22717 - gnunet/src/mesh,
gnunet <=