aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-02 10:39:55 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-02 10:39:55 +0000
commit20d9b41ade28ad770f376f5a6d8e53068a062b27 (patch)
treedddf5db44655df445bdd5bdd6760cf0d4fee3404 /src/transport/transport_api.c
parent7dce36b4e6e139da97d35e5d2eb5c9806742e10f (diff)
downloadgnunet-20d9b41ade28ad770f376f5a6d8e53068a062b27.tar.gz
gnunet-20d9b41ade28ad770f376f5a6d8e53068a062b27.zip
infinite bw hack
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r--src/transport/transport_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 2ececc10d..67d3d7674 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -681,7 +681,7 @@ transport_notify_ready (void *cls, size_t size, void *buf)
681 } 681 }
682 th = n->th; 682 th = n->th;
683 if (th->notify_size + sizeof (struct OutboundMessage) > size) 683 if (th->notify_size + sizeof (struct OutboundMessage) > size)
684 break; /* does not fit */ 684 break; /* does not fit */
685 if (GNUNET_BANDWIDTH_tracker_get_delay 685 if (GNUNET_BANDWIDTH_tracker_get_delay
686 (&n->out_tracker, th->notify_size).rel_value > 0) 686 (&n->out_tracker, th->notify_size).rel_value > 0)
687 break; /* too early */ 687 break; /* too early */
@@ -708,7 +708,8 @@ transport_notify_ready (void *cls, size_t size, void *buf)
708 memcpy (&cbuf[ret], &obm, sizeof (struct OutboundMessage)); 708 memcpy (&cbuf[ret], &obm, sizeof (struct OutboundMessage));
709 ret += (mret + sizeof (struct OutboundMessage)); 709 ret += (mret + sizeof (struct OutboundMessage));
710 size -= (mret + sizeof (struct OutboundMessage)); 710 size -= (mret + sizeof (struct OutboundMessage));
711 GNUNET_BANDWIDTH_tracker_consume (&n->out_tracker, mret); 711 if (NULL == getenv ("infinite-bandwidth"))
712 GNUNET_BANDWIDTH_tracker_consume (&n->out_tracker, mret);
712 } 713 }
713 GNUNET_free (th); 714 GNUNET_free (th);
714 } 715 }