aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection.c6
-rw-r--r--src/or/connection.h4
-rw-r--r--src/or/ext_orport.c3
-rw-r--r--src/or/ext_orport.h7
4 files changed, 14 insertions, 6 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index f1d7961a17..6c95245b57 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -3714,9 +3714,9 @@ connection_flush(connection_t *conn)
* it all, so we don't end up with many megabytes of controller info queued at
* once.
*/
-void
-connection_write_to_buf_impl_(const char *string, size_t len,
- connection_t *conn, int zlib)
+MOCK_IMPL(void,
+connection_write_to_buf_impl_,(const char *string, size_t len,
+ connection_t *conn, int zlib))
{
/* XXXX This function really needs to return -1 on failure. */
int r;
diff --git a/src/or/connection.h b/src/or/connection.h
index 19f11c7439..0454ac2f36 100644
--- a/src/or/connection.h
+++ b/src/or/connection.h
@@ -130,8 +130,8 @@ int connection_outbuf_too_full(connection_t *conn);
int connection_handle_write(connection_t *conn, int force);
int connection_flush(connection_t *conn);
-void connection_write_to_buf_impl_(const char *string, size_t len,
- connection_t *conn, int zlib);
+MOCK_DECL(void, connection_write_to_buf_impl_,
+ (const char *string, size_t len, connection_t *conn, int zlib));
/* DOCDOC connection_write_to_buf */
static void connection_write_to_buf(const char *string, size_t len,
connection_t *conn);
diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c
index e0980dedac..b1bb11bd46 100644
--- a/src/or/ext_orport.c
+++ b/src/or/ext_orport.c
@@ -6,6 +6,7 @@
* \brief Code implementing the Extended ORPort.
*/
+#define EXT_ORPORT_PRIVATE
#include "or.h"
#include "connection.h"
#include "connection_or.h"
@@ -52,7 +53,7 @@ connection_fetch_ext_or_cmd_from_buf(connection_t *conn, ext_or_cmd_t **out)
* <b>command</b> as the command type, <b>bodylen</b> as the body
* length, and <b>body</b>, if it's present, as the body of the
* message. */
-static int
+STATIC int
connection_write_ext_or_command(connection_t *conn,
uint16_t command,
const char *body,
diff --git a/src/or/ext_orport.h b/src/or/ext_orport.h
index 92ace7779c..35b92ad63f 100644
--- a/src/or/ext_orport.h
+++ b/src/or/ext_orport.h
@@ -22,5 +22,12 @@ int connection_ext_or_process_inbuf(or_connection_t *or_conn);
int init_ext_or_cookie_authentication(int is_enabled);
char *get_ext_or_auth_cookie_file_name(void);
+#ifdef EXT_ORPORT_PRIVATE
+STATIC int connection_write_ext_or_command(connection_t *conn,
+ uint16_t command,
+ const char *body,
+ size_t bodylen);
+#endif
+
#endif