aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-12-01 19:29:10 +0000
committerChristian Grothoff <christian@grothoff.org>2010-12-01 19:29:10 +0000
commit318e4c9274fefbb546363633ea465f9f339cb828 (patch)
tree8032ef4d3dc1d8bdfc9db4bc60f061e38024f9e9 /src/transport/transport_api.c
parent6f79c1c8c2bc7b19646de749e5c05eb77cea1d50 (diff)
downloadgnunet-318e4c9274fefbb546363633ea465f9f339cb828.tar.gz
gnunet-318e4c9274fefbb546363633ea465f9f339cb828.zip
comments for Nate
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r--src/transport/transport_api.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 414af0178..4d7825701 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -815,18 +815,39 @@ schedule_control_transmit (struct GNUNET_TRANSPORT_Handle *h,
815} 815}
816 816
817 817
818/**
819 * FIXME: document
820 */
818struct SetQuotaContext 821struct SetQuotaContext
819{ 822{
823 /**
824 * FIXME: document
825 */
820 struct GNUNET_TRANSPORT_Handle *handle; 826 struct GNUNET_TRANSPORT_Handle *handle;
821 827
828 /**
829 * FIXME: document
830 */
822 struct GNUNET_PeerIdentity target; 831 struct GNUNET_PeerIdentity target;
823 832
833 /**
834 * FIXME: document
835 */
824 GNUNET_SCHEDULER_Task cont; 836 GNUNET_SCHEDULER_Task cont;
825 837
838 /**
839 * Closure for 'cont'.
840 */
826 void *cont_cls; 841 void *cont_cls;
827 842
843 /**
844 * FIXME: document
845 */
828 struct GNUNET_TIME_Absolute timeout; 846 struct GNUNET_TIME_Absolute timeout;
829 847
848 /**
849 * FIXME: document
850 */
830 struct GNUNET_BANDWIDTH_Value32NBO quota_in; 851 struct GNUNET_BANDWIDTH_Value32NBO quota_in;
831}; 852};
832 853
@@ -1178,6 +1199,13 @@ neighbour_disconnect (struct NeighbourList *n)
1178#endif 1199#endif
1179 GNUNET_break (n->is_connected == GNUNET_YES); 1200 GNUNET_break (n->is_connected == GNUNET_YES);
1180 n->is_connected = GNUNET_NO; 1201 n->is_connected = GNUNET_NO;
1202 /* FIXME: this 'in_disconnect' flag is dubious; we should define
1203 clearly what disconnect means for pending 'notify_transmit_ready'
1204 requests; maybe a good approach is to REQUIRE clients to
1205 call 'notify_transmit_ready_cancel' on pending requests on disconnect
1206 and otherwise FAIL HARD with an assertion failure before
1207 'neighbour_free' right here (transmit_stage would be forced
1208 to 'TS_NEW') */
1181 n->in_disconnect = GNUNET_YES; 1209 n->in_disconnect = GNUNET_YES;
1182 if (h->nd_cb != NULL) 1210 if (h->nd_cb != NULL)
1183 h->nd_cb (h->cls, &n->id); 1211 h->nd_cb (h->cls, &n->id);
@@ -1509,6 +1537,12 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle)
1509#if DEBUG_TRANSPORT 1537#if DEBUG_TRANSPORT
1510 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transport disconnect called!\n"); 1538 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transport disconnect called!\n");
1511#endif 1539#endif
1540 /* FIXME: this flag is dubious, we should be able to do this
1541 more cleanly; also, we should probably do 'disconnect'
1542 callbacks for every connected peer here, i.e. by calling
1543 the iterator with 'forget_neighbours' instead of 'delete_neighbours'.
1544 */
1545
1512 handle->in_disconnect = GNUNET_YES; 1546 handle->in_disconnect = GNUNET_YES;
1513 1547
1514 GNUNET_assert (GNUNET_SYSERR != 1548 GNUNET_assert (GNUNET_SYSERR !=