summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-04-11 13:18:25 +0000
committerNick Mathewson <nickm@torproject.org>2007-04-11 13:18:25 +0000
commit38a5f0950250ad21e48ad60c1036621c58ecd9d4 (patch)
treea792258f5224faff370d13bc0fd541211da439fb /src/or/control.c
parent1c8f9b319b6cd94c1c00731349c9dda6ec723979 (diff)
downloadtor-38a5f0950250ad21e48ad60c1036621c58ecd9d4.tar.gz
tor-38a5f0950250ad21e48ad60c1036621c58ecd9d4.zip
r12349@catbus: nickm | 2007-04-11 09:18:15 -0400
Add code to shrink the cell memory pool by discarding empty chunks that have been empty for the last 60 seconds. Also, instead of having test.c duplicate declarations for exposed functions, put them inside #ifdef foo_PRIVATE blocks in the headers. This prevents bugs where test.c gets out of sync. svn:r9944
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/control.c b/src/or/control.c
index e8ed0acdde..17744939fb 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -10,6 +10,8 @@ const char control_c_id[] =
* See control-spec.txt for full details on protocol.
**/
+#define CONTROL_PRIVATE
+
#include "or.h"
/** Yield true iff <b>s</b> is the state of a control_connection_t that has
@@ -84,10 +86,6 @@ typedef int event_format_t;
static void connection_printf_to_buf(control_connection_t *conn,
const char *format, ...)
CHECK_PRINTF(2,3);
-/*static*/ size_t write_escaped_data(const char *data, size_t len,
- int translate_newlines, char **out);
-/*static*/ size_t read_escaped_data(const char *data, size_t len,
- int translate_newlines, char **out);
static void send_control_done(control_connection_t *conn);
static void send_control_event(uint16_t event, event_format_t which,
const char *format, ...)
@@ -317,7 +315,7 @@ write_escaped_data(const char *data, size_t len, int translate_newlines,
* that appears at the start of a line. If <b>translate_newlines</b>
* is true, replace all CRLF sequences with LF. Return the number of
* bytes in *<b>out</b>. */
-/*static*/ size_t
+/* static */ size_t
read_escaped_data(const char *data, size_t len, int translate_newlines,
char **out)
{