[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33005 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33005 - gnunet/src/mesh |
Date: |
Wed, 9 Apr 2014 19:18:48 +0200 |
Author: bartpolot
Date: 2014-04-09 19:18:48 +0200 (Wed, 09 Apr 2014)
New Revision: 33005
Modified:
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_peer.c
gnunet/src/mesh/mesh_path.h
Log:
- add context in path to link connection
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2014-04-09 17:18:46 UTC
(rev 33004)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2014-04-09 17:18:48 UTC
(rev 33005)
@@ -2439,6 +2439,7 @@
GNUNET_assert (own_pos <= p->length - 1);
c->own_pos = own_pos;
c->path = p;
+ p->c = c;
if (GNUNET_OK != register_neighbors (c))
{
Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c 2014-04-09 17:18:46 UTC (rev
33004)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c 2014-04-09 17:18:48 UTC (rev
33005)
@@ -744,12 +744,11 @@
best_p = NULL;
for (p = peer->path_head; NULL != p; p = p->next)
{
+ if (GNUNET_NO == path_is_valid (p))
+ continue; /* Don't use invalid paths. */
if (GNUNET_YES == GMT_is_path_used (peer->tunnel, p))
continue; /* If path is already in use, skip it. */
- if (GNUNET_NO == path_is_valid (p))
- continue; /* Don't use invalid paths. */
-
if ((cost = GMT_get_path_cost (peer->tunnel, p)) < best_cost)
{
best_cost = cost;
@@ -760,6 +759,16 @@
}
+/**
+ * Is this queue element sendable?
+ *
+ * - All management traffic is always sendable.
+ * - For payload traffic, check the connection flow control.
+ *
+ * @param q Queue element to inspect.
+ *
+ * @return #GNUNET_YES if it is sendable, #GNUNET_NO otherwise.
+ */
static int
queue_is_sendable (struct MeshPeerQueue *q)
{
Modified: gnunet/src/mesh/mesh_path.h
===================================================================
--- gnunet/src/mesh/mesh_path.h 2014-04-09 17:18:46 UTC (rev 33004)
+++ gnunet/src/mesh/mesh_path.h 2014-04-09 17:18:48 UTC (rev 33005)
@@ -24,6 +24,8 @@
* @author Bartlomiej Polot
*/
+#include "gnunet-service-mesh_connection.h"
+
#ifndef MESH_PATH_H_
#define MESH_PATH_H_
@@ -62,6 +64,11 @@
unsigned int length;
/**
+ * User defined data store.
+ */
+ struct MeshConnection *c;
+
+ /**
* Path's score, how reliable is the path.
*/
// int score;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33005 - gnunet/src/mesh,
gnunet <=