diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-06-06 17:58:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-07-10 15:20:10 -0400 |
commit | a3e0a87d951b1323ca542c9b115d5525d0d022c9 (patch) | |
tree | cf0f810beb6960ff0e5b092a8760a707656bc097 /src/or/connection_edge.c | |
parent | f7d654b81e1a65803c22bb53fc1d3a2021d87d50 (diff) | |
download | tor-a3e0a87d951b1323ca542c9b115d5525d0d022c9.tar.gz tor-a3e0a87d951b1323ca542c9b115d5525d0d022c9.zip |
Completely refactor how FILENAME_PRIVATE works
We previously used FILENAME_PRIVATE identifiers mostly for
identifiers exposed only to the unit tests... but also for
identifiers exposed to the benchmarker, and sometimes for
identifiers exposed to a similar module, and occasionally for no
really good reason at all.
Now, we use FILENAME_PRIVATE identifiers for identifiers shared by
Tor and the unit tests. They should be defined static when we
aren't building the unit test, and globally visible otherwise. (The
STATIC macro will keep us honest here.)
For identifiers used only by the unit tests and never by Tor at all,
on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS.
This is not the motivating use case for the split test/non-test
build system; it's just a test example to see how it works, and to
take a chance to clean up the code a little.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index bb7ffb9a40..33585a0944 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -407,7 +407,7 @@ connection_edge_finished_flushing(edge_connection_t *conn) * that the name resolution that led us to <b>addr</b> will be valid for * <b>ttl</b> seconds. Return -1 on error, or the number of bytes used on * success. */ -/* private */int +STATIC int connected_cell_format_payload(uint8_t *payload_out, const tor_addr_t *addr, uint32_t ttl) @@ -2265,7 +2265,7 @@ connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply, * Return -1 in the case where want to send a RELAY_END cell, and < -1 when * we don't. **/ -/* static */ int +STATIC int begin_cell_parse(const cell_t *cell, begin_cell_t *bcell, uint8_t *end_reason_out) { |