summaryrefslogtreecommitdiff
path: root/src/feature/control/control_proto.c
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2019-06-25 09:54:50 -0500
committerTaylor Yu <catalyst@torproject.org>2019-06-25 11:40:44 -0500
commite5e6953be74ab5d09608dcf6af48caae4e57464c (patch)
treef231d4ab986e990122c3e8f7d2c47bd88a7a6850 /src/feature/control/control_proto.c
parent0dd59fdb56c9a47a018856b689eaa3c6775ed3d4 (diff)
downloadtor-e5e6953be74ab5d09608dcf6af48caae4e57464c.tar.gz
tor-e5e6953be74ab5d09608dcf6af48caae4e57464c.zip
Make control_write_reply() mockable
Part of ticket 30889.
Diffstat (limited to 'src/feature/control/control_proto.c')
-rw-r--r--src/feature/control/control_proto.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/control/control_proto.c b/src/feature/control/control_proto.c
index 1dd62da2be..d2541e7308 100644
--- a/src/feature/control/control_proto.c
+++ b/src/feature/control/control_proto.c
@@ -176,8 +176,9 @@ send_control_done(control_connection_t *conn)
* @param c separator character, usually ' ', '-', or '+'
* @param s string
*/
-void
-control_write_reply(control_connection_t *conn, int code, int c, const char *s)
+MOCK_IMPL(void,
+control_write_reply, (control_connection_t *conn, int code, int c,
+ const char *s))
{
connection_printf_to_buf(conn, "%03d%c%s\r\n", code, c, s);
}