diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-03-11 12:57:57 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-03-11 12:57:57 +0000 |
commit | d984e2895f96f67fe2c44f27cdacfbb404485ada (patch) | |
tree | a9a355b13cc8d57096ff2de763d9cfd311a742b6 /src/core/core_api.c | |
parent | 914ec7ef9e59b69868b92fced96d6693b2097e13 (diff) | |
download | gnunet-d984e2895f96f67fe2c44f27cdacfbb404485ada.tar.gz gnunet-d984e2895f96f67fe2c44f27cdacfbb404485ada.zip |
implement cork option, fix testcases
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r-- | src/core/core_api.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c index a0f72090d..15e8add7e 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -346,6 +346,11 @@ struct GNUNET_CORE_TransmitHandle | |||
346 | */ | 346 | */ |
347 | uint16_t smr_id; | 347 | uint16_t smr_id; |
348 | 348 | ||
349 | /** | ||
350 | * Is corking allowed? | ||
351 | */ | ||
352 | int cork; | ||
353 | |||
349 | }; | 354 | }; |
350 | 355 | ||
351 | 356 | ||
@@ -707,6 +712,8 @@ transmit_message (void *cls, | |||
707 | sm->priority = htonl (th->priority); | 712 | sm->priority = htonl (th->priority); |
708 | sm->deadline = GNUNET_TIME_absolute_hton (th->timeout); | 713 | sm->deadline = GNUNET_TIME_absolute_hton (th->timeout); |
709 | sm->peer = pr->peer; | 714 | sm->peer = pr->peer; |
715 | sm->cork = htonl ((uint32_t) th->cork); | ||
716 | sm->reserved = htonl (0); | ||
710 | ret = th->get_message (th->get_message_cls, | 717 | ret = th->get_message (th->get_message_cls, |
711 | size - sizeof (struct SendMessage), | 718 | size - sizeof (struct SendMessage), |
712 | &sm[1]); | 719 | &sm[1]); |
@@ -1532,6 +1539,7 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, | |||
1532 | th->timeout = GNUNET_TIME_relative_to_absolute (maxdelay); | 1539 | th->timeout = GNUNET_TIME_relative_to_absolute (maxdelay); |
1533 | th->priority = priority; | 1540 | th->priority = priority; |
1534 | th->msize = notify_size; | 1541 | th->msize = notify_size; |
1542 | th->cork = cork; | ||
1535 | /* bound queue size */ | 1543 | /* bound queue size */ |
1536 | if (pr->queue_size == handle->queue_size) | 1544 | if (pr->queue_size == handle->queue_size) |
1537 | { | 1545 | { |