diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-10-11 14:53:38 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-10-11 14:53:38 +0000 |
commit | 03b222dc177798ed9448cdeca67ba4051c6397e3 (patch) | |
tree | 227a44f1ca1d455644db3657eee1c80c349d2674 /src/mesh | |
parent | cd67a970afe36e8a2aa99e48cbe103cc4cc26424 (diff) | |
download | gnunet-03b222dc177798ed9448cdeca67ba4051c6397e3.tar.gz gnunet-03b222dc177798ed9448cdeca67ba4051c6397e3.zip |
- use proper channel_ack/data_ack
Diffstat (limited to 'src/mesh')
-rw-r--r-- | src/mesh/gnunet-service-mesh_channel.c | 7 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_channel.h | 22 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.c | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c index 8b90938b1..be4f7d0c0 100644 --- a/src/mesh/gnunet-service-mesh_channel.c +++ b/src/mesh/gnunet-service-mesh_channel.c | |||
@@ -1076,7 +1076,7 @@ GMCH_send_data (struct MeshChannel *ch, | |||
1076 | * @param fwd Is for FWD traffic? (ACK dest->owner) | 1076 | * @param fwd Is for FWD traffic? (ACK dest->owner) |
1077 | */ | 1077 | */ |
1078 | void | 1078 | void |
1079 | GMCH_send_ack (struct MeshChannel *ch, int fwd) | 1079 | GMCH_send_data_ack (struct MeshChannel *ch, int fwd) |
1080 | { | 1080 | { |
1081 | struct GNUNET_MESH_DataACK msg; | 1081 | struct GNUNET_MESH_DataACK msg; |
1082 | struct MeshChannelReliability *rel; | 1082 | struct MeshChannelReliability *rel; |
@@ -1414,7 +1414,7 @@ GMCH_handle_data (struct MeshChannel *ch, | |||
1414 | mid, rel->mid_recv, rel->mid_recv + 64); | 1414 | mid, rel->mid_recv, rel->mid_recv + 64); |
1415 | } | 1415 | } |
1416 | 1416 | ||
1417 | GMCH_send_ack (ch, fwd); | 1417 | GMCH_send_data_ack (ch, fwd); |
1418 | } | 1418 | } |
1419 | 1419 | ||
1420 | 1420 | ||
@@ -1541,7 +1541,8 @@ GMCH_handle_create (const struct GNUNET_MESH_ChannelCreate *msg, | |||
1541 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! Reliable\n"); | 1541 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! Reliable\n"); |
1542 | 1542 | ||
1543 | GMCH_send_create (ch); | 1543 | GMCH_send_create (ch); |
1544 | GMCH_send_ack (ch, fwd); | 1544 | GMCH_send_data_ack (ch, fwd); |
1545 | channel_send_ack (ch, !fwd); | ||
1545 | 1546 | ||
1546 | if (GNUNET_NO == ch->dest_rel->client_ready) | 1547 | if (GNUNET_NO == ch->dest_rel->client_ready) |
1547 | { | 1548 | { |
diff --git a/src/mesh/gnunet-service-mesh_channel.h b/src/mesh/gnunet-service-mesh_channel.h index 3b6769132..c6dbc7835 100644 --- a/src/mesh/gnunet-service-mesh_channel.h +++ b/src/mesh/gnunet-service-mesh_channel.h | |||
@@ -107,17 +107,6 @@ int | |||
107 | GMCH_is_terminal (struct MeshChannel *ch, int fwd); | 107 | GMCH_is_terminal (struct MeshChannel *ch, int fwd); |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Send an end-to-end ACK message for the most recent in-sequence payload. | ||
111 | * | ||
112 | * If channel is not reliable, do nothing. | ||
113 | * | ||
114 | * @param ch Channel this is about. | ||
115 | * @param fwd Is for FWD traffic? (ACK dest->owner) | ||
116 | */ | ||
117 | void | ||
118 | GMCH_send_ack (struct MeshChannel *ch, int fwd); | ||
119 | |||
120 | /** | ||
121 | * Send data on a channel. | 110 | * Send data on a channel. |
122 | * | 111 | * |
123 | * If the destination is local, send it to client, otherwise encrypt and | 112 | * If the destination is local, send it to client, otherwise encrypt and |
@@ -133,6 +122,17 @@ GMCH_send_data (struct MeshChannel *ch, | |||
133 | int fwd); | 122 | int fwd); |
134 | 123 | ||
135 | /** | 124 | /** |
125 | * Send an end-to-end ACK message for the most recent in-sequence payload. | ||
126 | * | ||
127 | * If channel is not reliable, do nothing. | ||
128 | * | ||
129 | * @param ch Channel this is about. | ||
130 | * @param fwd Is for FWD traffic? (ACK dest->owner) | ||
131 | */ | ||
132 | void | ||
133 | GMCH_send_data_ack (struct MeshChannel *ch, int fwd); | ||
134 | |||
135 | /** | ||
136 | * Notify the destination client that a new incoming channel was created. | 136 | * Notify the destination client that a new incoming channel was created. |
137 | * | 137 | * |
138 | * @param ch Channel that was created. | 138 | * @param ch Channel that was created. |
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 453a94428..910b5f1f3 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c | |||
@@ -1685,7 +1685,7 @@ GMC_send_ack (struct MeshConnection *c, struct MeshChannel *ch, int fwd) | |||
1685 | { | 1685 | { |
1686 | GNUNET_assert (NULL != ch); | 1686 | GNUNET_assert (NULL != ch); |
1687 | LOG (GNUNET_ERROR_TYPE_DEBUG, " really sending!\n"); | 1687 | LOG (GNUNET_ERROR_TYPE_DEBUG, " really sending!\n"); |
1688 | send_local_ack (ch, fwd); | 1688 | GMCH_send_data_ack (ch, fwd); |
1689 | } | 1689 | } |
1690 | } | 1690 | } |
1691 | else if (NULL == c) | 1691 | else if (NULL == c) |