mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Make control_write_reply() mockable
Part of ticket 30889.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ size_t write_escaped_data(const char *data, size_t len, char **out);
|
||||
size_t read_escaped_data(const char *data, size_t len, char **out);
|
||||
void send_control_done(control_connection_t *conn);
|
||||
|
||||
void control_write_reply(control_connection_t *conn, int code, int c,
|
||||
const char *s);
|
||||
MOCK_DECL(void, control_write_reply, (control_connection_t *conn, int code,
|
||||
int c, const char *s));
|
||||
void control_vprintf_reply(control_connection_t *conn, int code, int c,
|
||||
const char *fmt, va_list ap)
|
||||
CHECK_PRINTF(4, 0);
|
||||
|
||||
Reference in New Issue
Block a user