diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-05-10 10:41:28 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-05-10 10:41:28 +0000 |
commit | 2310773fc8a783042345202855d7be6f88320ef9 (patch) | |
tree | 6b7564d7272c8688abb4db2336dc223e6969b929 /src | |
parent | 914ffe0165ed4456c676c76a4231cb8e84d6705b (diff) | |
download | gnunet-2310773fc8a783042345202855d7be6f88320ef9.tar.gz gnunet-2310773fc8a783042345202855d7be6f88320ef9.zip |
- adapt path keepalive to unicast (retransmission)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh-new.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh-new.c b/src/mesh/gnunet-service-mesh-new.c index 9578dee98..0c3253eef 100644 --- a/src/mesh/gnunet-service-mesh-new.c +++ b/src/mesh/gnunet-service-mesh-new.c | |||
@@ -1421,8 +1421,8 @@ send_core_data_raw (void *cls, size_t size, void *buf) | |||
1421 | 1421 | ||
1422 | 1422 | ||
1423 | /** | 1423 | /** |
1424 | * Sends an already built non-multicast message to a peer, | 1424 | * Sends an already built message to a peer, properly registrating |
1425 | * properly registrating all used resources. | 1425 | * all used resources. |
1426 | * | 1426 | * |
1427 | * @param message Message to send. Function makes a copy of it. | 1427 | * @param message Message to send. Function makes a copy of it. |
1428 | * @param peer Short ID of the neighbor whom to send the message. | 1428 | * @param peer Short ID of the neighbor whom to send the message. |
@@ -1973,8 +1973,6 @@ path_add_to_peers (struct MeshPeerPath *p, int confirmed) | |||
1973 | * | 1973 | * |
1974 | * @param cls Closure (tunnel for which to send the keepalive). | 1974 | * @param cls Closure (tunnel for which to send the keepalive). |
1975 | * @param tc Notification context. | 1975 | * @param tc Notification context. |
1976 | * | ||
1977 | * TODO: implement explicit multicast keepalive? | ||
1978 | */ | 1976 | */ |
1979 | static void | 1977 | static void |
1980 | path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 1978 | path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
@@ -2439,7 +2437,7 @@ tunnel_send_fwd_ack (struct MeshTunnel *t, uint16_t type) | |||
2439 | tunnel_send_client_fwd_ack (t); | 2437 | tunnel_send_client_fwd_ack (t); |
2440 | return; | 2438 | return; |
2441 | } | 2439 | } |
2442 | /* Is it after unicast / multicast retransmission? */ | 2440 | /* Is it after unicast retransmission? */ |
2443 | switch (type) | 2441 | switch (type) |
2444 | { | 2442 | { |
2445 | case GNUNET_MESSAGE_TYPE_MESH_UNICAST: | 2443 | case GNUNET_MESSAGE_TYPE_MESH_UNICAST: |
@@ -2650,7 +2648,7 @@ peer_unlock_queue(GNUNET_PEER_Id peer_id) | |||
2650 | if (NULL != peer->core_transmit) | 2648 | if (NULL != peer->core_transmit) |
2651 | return; | 2649 | return; |
2652 | 2650 | ||
2653 | q = queue_get_next(peer); | 2651 | q = queue_get_next (peer); |
2654 | if (NULL == q) | 2652 | if (NULL == q) |
2655 | { | 2653 | { |
2656 | /* Might br multicast traffic already sent to this particular peer but | 2654 | /* Might br multicast traffic already sent to this particular peer but |
@@ -4348,6 +4346,7 @@ handle_mesh_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
4348 | const struct GNUNET_MessageHeader *message) | 4346 | const struct GNUNET_MessageHeader *message) |
4349 | { | 4347 | { |
4350 | struct GNUNET_MESH_TunnelKeepAlive *msg; | 4348 | struct GNUNET_MESH_TunnelKeepAlive *msg; |
4349 | struct GNUNET_PeerIdentity id; | ||
4351 | struct MeshTunnel *t; | 4350 | struct MeshTunnel *t; |
4352 | 4351 | ||
4353 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got a keepalive packet from %s\n", | 4352 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got a keepalive packet from %s\n", |
@@ -4367,7 +4366,7 @@ handle_mesh_keepalive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
4367 | tunnel_reset_timeout (t); | 4366 | tunnel_reset_timeout (t); |
4368 | 4367 | ||
4369 | GNUNET_STATISTICS_update (stats, "# keepalives forwarded", 1, GNUNET_NO); | 4368 | GNUNET_STATISTICS_update (stats, "# keepalives forwarded", 1, GNUNET_NO); |
4370 | /* FIXME tunnel_send_multicast (t, message); */ | 4369 | send_prebuilt_message (message, NULL, t); |
4371 | return GNUNET_OK; | 4370 | return GNUNET_OK; |
4372 | } | 4371 | } |
4373 | 4372 | ||