[or-cvs] linkpadding is now off by default.
Roger Dingledine
arma at seul.org
Fri Aug 23 06:49:46 UTC 2002
Update of /home/or/cvsroot/src/or
In directory moria.seul.org:/home/arma/work/onion/cvs/src/or
Modified Files:
config.c buffers.c
Log Message:
linkpadding is now off by default.
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- config.c 16 Jul 2002 01:12:15 -0000 1.11
+++ config.c 23 Aug 2002 06:49:43 -0000 1.12
@@ -99,7 +99,7 @@
options->LogLevel = "debug";
options->loglevel = LOG_DEBUG;
options->CoinWeight = 0.8;
- options->LinkPadding = 1;
+ options->LinkPadding = 0;
options->Role = ROLE_OR_LISTEN | ROLE_OR_CONNECT_ALL | ROLE_OP_LISTEN | ROLE_AP_LISTEN;
code = poptGetNextOpt(optCon); /* first we handle command-line args */
Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/buffers.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- buffers.c 18 Jul 2002 06:37:58 -0000 1.6
+++ buffers.c 23 Aug 2002 06:49:43 -0000 1.7
@@ -6,6 +6,8 @@
#include "or.h"
+extern or_options_t options; /* command-line and config-file options */
+
int buf_new(char **buf, size_t *buflen, size_t *buf_datalen) {
assert(buf && buflen && buf_datalen);
@@ -44,6 +46,13 @@
if(at_most == 0)
return 0; /* we shouldn't read anything */
+
+ if(!options.LinkPadding && at_most > 10*sizeof(cell_t)) {
+ /* if no linkpadding. do a rudimentary round-robin so one
+ * connection can't hog our receiver bucket
+ */
+ at_most = 10*sizeof(cell_t);
+ }
// log(LOG_DEBUG,"read_to_buf(): reading at most %d bytes.",at_most);
read_result = read(s, *buf+*buf_datalen, at_most);
More information about the tor-commits
mailing list