diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-06-03 20:43:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-06-03 20:43:37 +0000 |
commit | 9017f014c0d56dafe03c912540fb0bd0345ef918 (patch) | |
tree | 4ec026045759038cda337d7dc30a45bc8dbfc6ec /src/transport/transport_api.c | |
parent | 139bf3e0f8ad7a010676e53838acb5be9227441b (diff) | |
download | gnunet-9017f014c0d56dafe03c912540fb0bd0345ef918.tar.gz gnunet-9017f014c0d56dafe03c912540fb0bd0345ef918.zip |
simplify api
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r-- | src/transport/transport_api.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 0fc1bb8ef..ef846c147 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -925,19 +925,12 @@ send_set_quota (void *cls, size_t size, void *buf) | |||
925 | * @param target who's bandwidth quota is being changed | 925 | * @param target who's bandwidth quota is being changed |
926 | * @param quota_in incoming bandwidth quota in bytes per ms | 926 | * @param quota_in incoming bandwidth quota in bytes per ms |
927 | * @param quota_out outgoing bandwidth quota in bytes per ms | 927 | * @param quota_out outgoing bandwidth quota in bytes per ms |
928 | * @param timeout how long to wait until signaling failure if | ||
929 | * we can not communicate the quota change | ||
930 | * @param cont continuation to call when done, will be called | ||
931 | * either with reason "TIMEOUT" or with reason "PREREQ_DONE" | ||
932 | * @param cont_cls closure for continuation | ||
933 | */ | 928 | */ |
934 | void | 929 | void |
935 | GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, | 930 | GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, |
936 | const struct GNUNET_PeerIdentity *target, | 931 | const struct GNUNET_PeerIdentity *target, |
937 | struct GNUNET_BANDWIDTH_Value32NBO quota_in, | 932 | struct GNUNET_BANDWIDTH_Value32NBO quota_in, |
938 | struct GNUNET_BANDWIDTH_Value32NBO quota_out, | 933 | struct GNUNET_BANDWIDTH_Value32NBO quota_out) |
939 | struct GNUNET_TIME_Relative timeout, | ||
940 | GNUNET_SCHEDULER_Task cont, void *cont_cls) | ||
941 | { | 934 | { |
942 | struct NeighbourList *n; | 935 | struct NeighbourList *n; |
943 | struct SetQuotaContext *sqc; | 936 | struct SetQuotaContext *sqc; |
@@ -973,9 +966,9 @@ GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, | |||
973 | sqc = GNUNET_malloc (sizeof (struct SetQuotaContext)); | 966 | sqc = GNUNET_malloc (sizeof (struct SetQuotaContext)); |
974 | sqc->handle = handle; | 967 | sqc->handle = handle; |
975 | sqc->target = *target; | 968 | sqc->target = *target; |
976 | sqc->cont = cont; | 969 | sqc->cont = NULL; |
977 | sqc->cont_cls = cont_cls; | 970 | sqc->cont_cls = NULL; |
978 | sqc->timeout = GNUNET_TIME_relative_to_absolute (timeout); | 971 | sqc->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_FOREVER_REL); |
979 | sqc->quota_in = quota_in; | 972 | sqc->quota_in = quota_in; |
980 | schedule_control_transmit (handle, | 973 | schedule_control_transmit (handle, |
981 | sizeof (struct QuotaSetMessage), | 974 | sizeof (struct QuotaSetMessage), |