diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-04-21 14:54:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-21 14:54:04 +0200 |
commit | 1c24355745a810d20b9fd7545631be6300d0b71c (patch) | |
tree | 11769eba5e038d1970a5f085f08ea4b2a7d4e15a /src/transport | |
parent | fe3cc0e1a6f83c6ba4e0e1ec1185f1173ff16570 (diff) | |
download | gnunet-1c24355745a810d20b9fd7545631be6300d0b71c.tar.gz gnunet-1c24355745a810d20b9fd7545631be6300d0b71c.zip |
define constant
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-service-tng.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index 4dc3a137d..7683ed016 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * - proper use/initialization of timestamps in messages exchanged | 28 | * - proper use/initialization of timestamps in messages exchanged |
29 | * during DV learning | 29 | * during DV learning |
30 | * - persistence of monotonic time obtained from other peers | 30 | * - persistence of monotonic time obtained from other peers |
31 | * in PEERSTORE (by message type) | 31 | * in PEERSTORE (by message type) -- done for backchannel, needed elsewhere? |
32 | * - change transport-core API to provide proper flow control in both | 32 | * - change transport-core API to provide proper flow control in both |
33 | * directions, allow multiple messages per peer simultaneously (tag | 33 | * directions, allow multiple messages per peer simultaneously (tag |
34 | * confirmations with unique message ID), and replace quota-out with | 34 | * confirmations with unique message ID), and replace quota-out with |
@@ -4874,16 +4874,17 @@ update_backtalker_monotime (struct Backtalker *b) | |||
4874 | b->task = NULL; | 4874 | b->task = NULL; |
4875 | } | 4875 | } |
4876 | mtbe = GNUNET_TIME_absolute_hton (b->monotonic_time); | 4876 | mtbe = GNUNET_TIME_absolute_hton (b->monotonic_time); |
4877 | b->sc = GNUNET_PEERSTORE_store (peerstore, | 4877 | b->sc = |
4878 | "transport", | 4878 | GNUNET_PEERSTORE_store (peerstore, |
4879 | &b->pid, | 4879 | "transport", |
4880 | "transport-backchannel-monotonic-time", | 4880 | &b->pid, |
4881 | &mtbe, | 4881 | GNUNET_PEERSTORE_TRANSPORT_BACKCHANNEL_MONOTIME, |
4882 | sizeof (mtbe), | 4882 | &mtbe, |
4883 | GNUNET_TIME_UNIT_FOREVER_ABS, | 4883 | sizeof (mtbe), |
4884 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, | 4884 | GNUNET_TIME_UNIT_FOREVER_ABS, |
4885 | &backtalker_monotime_store_cb, | 4885 | GNUNET_PEERSTORE_STOREOPTION_REPLACE, |
4886 | b); | 4886 | &backtalker_monotime_store_cb, |
4887 | b); | ||
4887 | } | 4888 | } |
4888 | 4889 | ||
4889 | 4890 | ||
@@ -5003,12 +5004,13 @@ handle_backchannel_encapsulation ( | |||
5003 | b->timeout = | 5004 | b->timeout = |
5004 | GNUNET_TIME_relative_to_absolute (BACKCHANNEL_INACTIVITY_TIMEOUT); | 5005 | GNUNET_TIME_relative_to_absolute (BACKCHANNEL_INACTIVITY_TIMEOUT); |
5005 | b->task = GNUNET_SCHEDULER_add_at (b->timeout, &backtalker_timeout_cb, b); | 5006 | b->task = GNUNET_SCHEDULER_add_at (b->timeout, &backtalker_timeout_cb, b); |
5006 | b->get = GNUNET_PEERSTORE_iterate (peerstore, | 5007 | b->get = |
5007 | "transport", | 5008 | GNUNET_PEERSTORE_iterate (peerstore, |
5008 | &b->pid, | 5009 | "transport", |
5009 | "transport-backchannel-monotonic-time", | 5010 | &b->pid, |
5010 | &backtalker_monotime_cb, | 5011 | GNUNET_PEERSTORE_TRANSPORT_BACKCHANNEL_MONOTIME, |
5011 | b); | 5012 | &backtalker_monotime_cb, |
5013 | b); | ||
5012 | } | 5014 | } |
5013 | } | 5015 | } |
5014 | 5016 | ||