aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-10-11 14:31:45 +0000
committerBart Polot <bart@net.in.tum.de>2013-10-11 14:31:45 +0000
commit303053f66bbfb4aff2f4c7514fe0dc2e30d5415c (patch)
tree08b15c6d06e9132fe747e2c45a0caf7865c0f31e /src/mesh
parent0bcc09cc685395189b73bd33af0376e20a2958e6 (diff)
downloadgnunet-303053f66bbfb4aff2f4c7514fe0dc2e30d5415c.tar.gz
gnunet-303053f66bbfb4aff2f4c7514fe0dc2e30d5415c.zip
- simplify acks
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/gnunet-service-mesh_channel.c10
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c6
2 files changed, 7 insertions, 9 deletions
diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c
index 9019fb42c..d0c39edfb 100644
--- a/src/mesh/gnunet-service-mesh_channel.c
+++ b/src/mesh/gnunet-service-mesh_channel.c
@@ -631,7 +631,7 @@ channel_confirm (struct MeshChannel *ch, int fwd)
631 /* TODO return? */ 631 /* TODO return? */
632 } 632 }
633 } 633 }
634 send_ack (NULL, ch, fwd); 634 GMC_send_ack (NULL, ch, fwd);
635} 635}
636 636
637 637
@@ -828,7 +828,6 @@ channel_set_options (struct MeshChannel *ch, uint32_t options)
828} 828}
829 829
830 830
831
832/** 831/**
833 * Confirm we got a channel create. 832 * Confirm we got a channel create.
834 * 833 *
@@ -843,9 +842,8 @@ channel_send_ack (struct MeshChannel *ch, int fwd)
843 msg.header.size = htons (sizeof (msg)); 842 msg.header.size = htons (sizeof (msg));
844 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK); 843 msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK);
845 LOG (GNUNET_ERROR_TYPE_DEBUG, 844 LOG (GNUNET_ERROR_TYPE_DEBUG,
846 " sending channel %s ack for channel %s:%X\n", 845 " sending channel %s ack for channel %s\n",
847 fwd ? "FWD" : "BCK", GMT_2s (ch->t), 846 fwd ? "FWD" : "BCK", GMCH_2s (ch));
848 ch->gid);
849 847
850 msg.chid = htonl (ch->gid); 848 msg.chid = htonl (ch->gid);
851 GMCH_send_prebuilt_message (&msg.header, ch, !fwd); 849 GMCH_send_prebuilt_message (&msg.header, ch, !fwd);
@@ -1168,7 +1166,7 @@ GMCH_handle_local_ack (struct MeshChannel *ch, int fwd)
1168 1166
1169 rel->client_ready = GNUNET_YES; 1167 rel->client_ready = GNUNET_YES;
1170 send_client_buffered_data (ch, c, fwd); 1168 send_client_buffered_data (ch, c, fwd);
1171 send_ack (NULL, ch, fwd); 1169 GMC_send_ack (NULL, ch, fwd);
1172} 1170}
1173 1171
1174 1172
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index 07e75ab87..453a94428 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -1382,7 +1382,7 @@ handle_mesh_encrypted (const struct GNUNET_PeerIdentity *peer,
1382 } 1382 }
1383 fc->last_pid_recv = pid; 1383 fc->last_pid_recv = pid;
1384 GMT_handle_encrypted (c->t, msg, fwd); 1384 GMT_handle_encrypted (c->t, msg, fwd);
1385 send_ack (c, NULL, fwd); 1385 GMC_send_ack (c, NULL, fwd);
1386 return GNUNET_OK; 1386 return GNUNET_OK;
1387 } 1387 }
1388 1388
@@ -1394,7 +1394,7 @@ handle_mesh_encrypted (const struct GNUNET_PeerIdentity *peer,
1394 { 1394 {
1395 GNUNET_STATISTICS_update (stats, "# TTL drops", 1, GNUNET_NO); 1395 GNUNET_STATISTICS_update (stats, "# TTL drops", 1, GNUNET_NO);
1396 LOG (GNUNET_ERROR_TYPE_WARNING, " TTL is 0, DROPPING!\n"); 1396 LOG (GNUNET_ERROR_TYPE_WARNING, " TTL is 0, DROPPING!\n");
1397 send_ack (c, NULL, fwd); 1397 GMC_send_ack (c, NULL, fwd);
1398 return GNUNET_OK; 1398 return GNUNET_OK;
1399 } 1399 }
1400 GNUNET_STATISTICS_update (stats, "# messages forwarded", 1, GNUNET_NO); 1400 GNUNET_STATISTICS_update (stats, "# messages forwarded", 1, GNUNET_NO);
@@ -1585,7 +1585,7 @@ GMC_handle_poll (void *cls, const struct GNUNET_PeerIdentity *peer,
1585 pid, fc->last_pid_recv); 1585 pid, fc->last_pid_recv);
1586 fc->last_pid_recv = pid; 1586 fc->last_pid_recv = pid;
1587 fwd = fc == &c->fwd_fc; 1587 fwd = fc == &c->fwd_fc;
1588 send_ack (c, NULL, fwd); 1588 GMC_send_ack (c, NULL, fwd);
1589 1589
1590 return GNUNET_OK; 1590 return GNUNET_OK;
1591} 1591}