diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-08-02 00:07:58 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-08-02 00:07:58 +0000 |
commit | 44fd45bf6dc1780f357a4c938d9a70de41cf08d1 (patch) | |
tree | 922e289aa5a204e586920efb4b090ad108d03abc /src | |
parent | a6d8bc60967075b4fb9fcabaf19da4de09569abe (diff) | |
download | gnunet-44fd45bf6dc1780f357a4c938d9a70de41cf08d1.tar.gz gnunet-44fd45bf6dc1780f357a4c938d9a70de41cf08d1.zip |
- dont send p2p traffic for local clients
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh-enc.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mesh/gnunet-service-mesh-enc.c b/src/mesh/gnunet-service-mesh-enc.c index e2aa24497..c63649601 100644 --- a/src/mesh/gnunet-service-mesh-enc.c +++ b/src/mesh/gnunet-service-mesh-enc.c | |||
@@ -1537,8 +1537,8 @@ send_prebuilt_message_tunnel (struct GNUNET_MESH_Encrypted *msg, | |||
1537 | */ | 1537 | */ |
1538 | static void | 1538 | static void |
1539 | send_prebuilt_message_channel (const struct GNUNET_MessageHeader *message, | 1539 | send_prebuilt_message_channel (const struct GNUNET_MessageHeader *message, |
1540 | struct MeshChannel *ch, | 1540 | struct MeshChannel *ch, |
1541 | int fwd) | 1541 | int fwd) |
1542 | { | 1542 | { |
1543 | struct GNUNET_MESH_Encrypted *msg; | 1543 | struct GNUNET_MESH_Encrypted *msg; |
1544 | size_t size = ntohs (message->size); | 1544 | size_t size = ntohs (message->size); |
@@ -3407,17 +3407,15 @@ channel_send_destroy (struct MeshChannel *ch) | |||
3407 | GNUNET_i2s (GNUNET_PEER_resolve2 (ch->t->peer->id)), | 3407 | GNUNET_i2s (GNUNET_PEER_resolve2 (ch->t->peer->id)), |
3408 | ch->id); | 3408 | ch->id); |
3409 | 3409 | ||
3410 | send_prebuilt_message_channel (&msg.header, ch, GNUNET_YES); | ||
3411 | send_prebuilt_message_channel (&msg.header, ch, GNUNET_NO); | ||
3412 | |||
3413 | if (NULL != ch->owner) | 3410 | if (NULL != ch->owner) |
3414 | { | ||
3415 | send_local_channel_destroy (ch, GNUNET_NO); | 3411 | send_local_channel_destroy (ch, GNUNET_NO); |
3416 | } | 3412 | else |
3413 | send_prebuilt_message_channel (&msg.header, ch, GNUNET_NO); | ||
3414 | |||
3417 | if (NULL != ch->client) | 3415 | if (NULL != ch->client) |
3418 | { | ||
3419 | send_local_channel_destroy (ch, GNUNET_YES); | 3416 | send_local_channel_destroy (ch, GNUNET_YES); |
3420 | } | 3417 | else |
3418 | send_prebuilt_message_channel (&msg.header, ch, GNUNET_YES); | ||
3421 | } | 3419 | } |
3422 | 3420 | ||
3423 | 3421 | ||