Nick Mathewson
17dcce3fe1
Fix wide lines introduced by previous patch.
2017-12-08 14:47:19 -05:00
Nick Mathewson
285632a61b
Replace all FREE_AND_NULL* uses to take a type and a free function.
...
This commit was made mechanically by this perl script:
\#!/usr/bin/perl -w -i -p
next if /^#define FREE_AND_NULL/;
s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/;
s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08 14:47:19 -05:00
Nick Mathewson
0792cc107e
Convert connection_free to a nulling macro.
2017-12-08 14:47:19 -05:00
Nick Mathewson
a48ba072a9
Rename connection_free_ to connection_free_minimal.
2017-12-08 14:47:19 -05:00
Nick Mathewson
bf8a7201ce
Remove remove_file_if_very_old() -- nothing calls it.
2017-11-14 15:33:58 -05:00
Nick Mathewson
a321f8f4af
Merge branch 'buf_for_stringbuffer_squashed'
2017-11-02 10:01:30 -04:00
Nick Mathewson
3b30015143
Refactor connection_write_to_buf_impl_(); add one that takes a buf_t
2017-11-02 10:00:32 -04:00
Nick Mathewson
f0daaf8d60
Expose connection_init_accepted_conn.
2017-10-18 12:55:09 -04:00
Nick Mathewson
c1deabd3b0
Run our #else/#endif annotator on our source code.
2017-09-15 16:24:44 -04:00
Nick Mathewson
ca19a95d54
Merge remote-tracking branch 'dgoulet/ticket23355_032_01'
2017-09-08 12:13:48 -04:00
Nick Mathewson
4a7e90adc5
Repair buffer API so everything starts with buf_.
...
Our convention is that functions which manipulate a type T should be
named T_foo. But the buffer functions were super old, and followed
all kinds of conventions. Now they're uniform.
Here's the perl I used to do this:
\#!/usr/bin/perl -w -i -p
s/read_to_buf\(/buf_read_from_socket\(/;
s/flush_buf\(/buf_flush_to_socket\(/;
s/read_to_buf_tls\(/buf_read_from_tls\(/;
s/flush_buf_tls\(/buf_flush_to_tls\(/;
s/write_to_buf\(/buf_add\(/;
s/write_to_buf_compress\(/buf_add_compress\(/;
s/move_buf_to_buf\(/buf_move_to_buf\(/;
s/peek_from_buf\(/buf_peek\(/;
s/fetch_from_buf\(/buf_get_bytes\(/;
s/fetch_from_buf_line\(/buf_get_line\(/;
s/fetch_from_buf_line\(/buf_get_line\(/;
s/buf_remove_from_front\(/buf_drain\(/;
s/peek_buf_startswith\(/buf_peek_startswith\(/;
s/assert_buf_ok\(/buf_assert_ok\(/;
2017-09-05 13:57:51 -04:00
David Goulet
22295759af
prop224: Purge client state on NEWNYM
...
Closes #23355
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-30 09:15:54 -04:00
David Goulet
6222eae8ca
conn: Add a function to return a list of connection by state
...
This will be useful to the hidden service subsystem that needs to go over all
connections of a certain state to attach them to a hidden service circuit.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24 13:03:28 -04:00
Alexander Færøy
b8c9f229d7
Rename write_to_buf_zlib()
to write_to_buf_compress()
.
...
See https://bugs.torproject.org/21663
2017-04-18 01:23:39 +02:00
Nick Mathewson
7505f452c8
Run the copyright update script.
2017-03-15 16:13:17 -04:00
Andrea Shepard
1a7709d409
Add connection_is_moribund() inline
2016-08-20 03:34:16 +00:00
Andrea Shepard
dbdac1dc27
s/connection_handle_oos/connection_check_oos/g per code review
2016-08-20 02:44:33 +00:00
Andrea Shepard
e17083b432
Unit test for kill_conn_list_for_oos()
2016-08-20 01:43:52 +00:00
Andrea Shepard
26c2ded00c
Unit test for connection_handle_oos()
2016-08-20 01:43:51 +00:00
Andrea Shepard
34d9d02150
Stub out connection_handle_oos() and call it from places we can change the socket count or thresholds
2016-08-20 01:43:46 +00:00
Nick Mathewson
7f145b54af
Merge remote-tracking branch 'public/Fix_19450'
2016-08-12 16:11:28 -04:00
Nick Mathewson
4d4ccc505b
Search for remaining references to 'bufferevent'.
...
Remove or adjust as appropriate.
2016-08-02 13:59:47 -04:00
Nick Mathewson
c68a23a135
Bufferevent removal: remove HAS_BUFFEREVENT macros and usage
...
This is another way that we had bufferevents-only code marked.
2016-08-02 13:15:10 -04:00
Nick Mathewson
4757303873
Fix all -Wshadow warnings on Linux
...
This is a partial fix for 18902.
2016-07-28 06:58:44 -04:00
U+039b
c735220a0b
Remove bufferevents dead code
...
Signed-off-by: U+039b <*@0x39b.fr>
2016-07-14 18:46:37 +02:00
Roger Dingledine
c98fbd4169
remove some more unused code
2016-05-09 14:42:09 -04:00
Nick Mathewson
57699de005
Update the copyright year.
2016-02-27 18:48:19 +01:00
teor (Tim Wilson-Brown)
e72cbf7a4e
Choose directory servers by IPv4/IPv6 preferences
...
Add unit tests, refactor pick_directory functions.
2016-01-29 07:13:57 +11:00
Nick Mathewson
744958e0dd
Fix a few compilation warnings and errors
2015-12-15 13:03:21 -05:00
Nick Mathewson
a7d44731d9
Merge remote-tracking branch 'teor/feature4483-v10-squashed'
2015-12-15 12:57:57 -05:00
teor (Tim Wilson-Brown)
df0c135d62
Prop210: Refactor connection_get_* to produce lists and counts
2015-12-16 04:02:12 +11:00
cypherpunks
824a6a2a90
Replace usage of INLINE with inline
...
This patch was generated using;
sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-12-15 11:34:00 -05:00
Arlo Breault
d68b7fd442
Refactor clock skew warning code to avoid duplication
2015-12-10 19:54:11 -05:00
rl1987
77a5ca901f
Unit test dns_resolve(), dns_clip_ttl(), dns_get_expiry_ttl().
2015-08-23 16:02:39 +03:00
Nick Mathewson
4c1a779539
Restrict unix: addresses to control and socks for now
2015-01-29 14:51:59 -05:00
Andrea Shepard
ca5ba2956b
Support connection_exit_connect() to AF_UNIX sockets
2015-01-28 14:30:23 -05:00
Nick Mathewson
f54e54b0b4
Bump copyright dates to 2015, in case someday this matters.
2015-01-02 14:27:39 -05:00
teor
13298d90a9
Silence spurious clang warnings
...
Silence clang warnings under --enable-expensive-hardening, including:
+ implicit truncation of 64 bit values to 32 bit;
+ const char assignment to self;
+ tautological compare; and
+ additional parentheses around equality tests. (gcc uses these to
silence assignment, so clang warns when they're present in an
equality test. But we need to use extra parentheses in macros to
isolate them from other code).
2014-10-30 22:34:46 +11:00
Nick Mathewson
fcdcb377a4
Add another year to our copyright dates.
...
Because in 95 years, we or our successors will surely care about
enforcing the BSD license terms on this code. Right?
2014-10-28 15:30:16 -04:00
George Kadianakis
1c475eb018
Throw control port warning if we failed to connect to all our bridges.
2014-03-10 22:52:07 +00:00
Nick Mathewson
b3a6907493
Remove a bunch of functions that were never called.
2014-02-15 15:33:34 -05:00
Karsten Loesing
2e0fad542c
Merge branch 'morestats4' into morestats5
...
Conflicts:
doc/tor.1.txt
src/or/config.c
src/or/connection.h
src/or/control.c
src/or/control.h
src/or/or.h
src/or/relay.c
src/or/relay.h
src/test/test.c
2013-10-28 12:09:42 +01:00
Karsten Loesing
d5f0d792dd
Pass around const struct timeval * instead of struct timeval.
...
Suggested by nickm.
2013-09-12 10:10:38 +02:00
Nick Mathewson
03e3881043
Tests for connection_write_ext_or_command.
2013-08-15 12:03:36 -04:00
Nick Mathewson
c342ea9879
Unit tests for ext_or_id_map.
2013-08-15 12:03:36 -04:00
Nick Mathewson
8bf0382b22
Skeleton ExtORPort implementation. Needs testing, documentation.
...
Does not implement TransportControlPort yet.
2013-07-18 14:59:55 -04:00
Karsten Loesing
e39292f21d
Test functions used for TB_EMPTY and CELL_STATS events.
2013-05-31 16:12:28 +02:00
George Kadianakis
faf4f6c6d1
Validate SOCKS arguments.
2013-02-09 16:30:16 +00:00
Nick Mathewson
4da083db3b
Update the copyright date to 201.
2013-01-16 01:54:56 -05:00
Andrea Shepard
8124398835
Check for orconns in connection_mark_for_close and connection_mark_and_flush, and pass the call through channel_close_for_error with a warning to avoid asserts
2012-11-10 02:35:47 -08:00