diff options
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.c | 10 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index dbbf59156..d46137cb9 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c | |||
@@ -499,13 +499,11 @@ send_queued_data (struct MeshTunnel3 *t, int fwd) | |||
499 | * @param t Tunnel to hold the message. | 499 | * @param t Tunnel to hold the message. |
500 | * @param ch Channel the message is about. | 500 | * @param ch Channel the message is about. |
501 | * @param msg Message itself (copy will be made). | 501 | * @param msg Message itself (copy will be made). |
502 | * @param fwd Is this fwd? | ||
503 | */ | 502 | */ |
504 | static void | 503 | static void |
505 | queue_data (struct MeshTunnel3 *t, | 504 | queue_data (struct MeshTunnel3 *t, |
506 | struct MeshChannel *ch, | 505 | struct MeshChannel *ch, |
507 | const struct GNUNET_MessageHeader *msg, | 506 | const struct GNUNET_MessageHeader *msg) |
508 | int fwd) | ||
509 | { | 507 | { |
510 | struct MeshTunnelQueue *tq; | 508 | struct MeshTunnelQueue *tq; |
511 | uint16_t size = ntohs (msg->size); | 509 | uint16_t size = ntohs (msg->size); |
@@ -513,7 +511,6 @@ queue_data (struct MeshTunnel3 *t, | |||
513 | if (MESH_TUNNEL3_READY == t->state) | 511 | if (MESH_TUNNEL3_READY == t->state) |
514 | { | 512 | { |
515 | GNUNET_break (0); | 513 | GNUNET_break (0); |
516 | GMT_send_prebuilt_message (msg, t, ch, fwd); | ||
517 | return; | 514 | return; |
518 | } | 515 | } |
519 | 516 | ||
@@ -1782,7 +1779,7 @@ GMT_send_acks (struct MeshTunnel3 *t, int fwd) | |||
1782 | * @param message Message to send. Function modifies it. | 1779 | * @param message Message to send. Function modifies it. |
1783 | * @param t Tunnel on which this message is transmitted. | 1780 | * @param t Tunnel on which this message is transmitted. |
1784 | * @param ch Channel on which this message is transmitted. | 1781 | * @param ch Channel on which this message is transmitted. |
1785 | * @param fwd Is this a fwd message? | 1782 | * @param fwd Is this a fwd message on @c ch? |
1786 | */ | 1783 | */ |
1787 | void | 1784 | void |
1788 | GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | 1785 | GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, |
@@ -1800,7 +1797,7 @@ GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
1800 | 1797 | ||
1801 | if (MESH_TUNNEL3_READY != t->state) | 1798 | if (MESH_TUNNEL3_READY != t->state) |
1802 | { | 1799 | { |
1803 | queue_data (t, ch, message, fwd); | 1800 | queue_data (t, ch, message); |
1804 | return; | 1801 | return; |
1805 | } | 1802 | } |
1806 | LOG (GNUNET_ERROR_TYPE_DEBUG, "GMT Send on Tunnel %s\n", GMT_2s (t)); | 1803 | LOG (GNUNET_ERROR_TYPE_DEBUG, "GMT Send on Tunnel %s\n", GMT_2s (t)); |
@@ -1840,6 +1837,7 @@ GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
1840 | GNUNET_break (0); | 1837 | GNUNET_break (0); |
1841 | } | 1838 | } |
1842 | 1839 | ||
1840 | fwd = GMC_is_origin (c, GNUNET_YES); | ||
1843 | GMC_send_prebuilt_message (&msg->header, c, fwd); | 1841 | GMC_send_prebuilt_message (&msg->header, c, fwd); |
1844 | } | 1842 | } |
1845 | 1843 | ||
diff --git a/src/mesh/gnunet-service-mesh_tunnel.h b/src/mesh/gnunet-service-mesh_tunnel.h index 7336898c9..14d3eb934 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.h +++ b/src/mesh/gnunet-service-mesh_tunnel.h | |||
@@ -340,7 +340,7 @@ GMT_send_acks (struct MeshTunnel3 *t, int fwd); | |||
340 | * @param message Message to send. Function modifies it. | 340 | * @param message Message to send. Function modifies it. |
341 | * @param t Tunnel on which this message is transmitted. | 341 | * @param t Tunnel on which this message is transmitted. |
342 | * @param ch Channel on which this message is transmitted. | 342 | * @param ch Channel on which this message is transmitted. |
343 | * @param fwd Is this a fwd message? | 343 | * @param fwd Is this a fwd message on @c ch? |
344 | */ | 344 | */ |
345 | void | 345 | void |
346 | GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | 346 | GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, |