summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-12-13 19:12:34 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-19 15:02:08 -0500
commit02068c6391fc5b9febac1f02de7028688c92eee2 (patch)
treedfcf147fa9cb895272863ff97dd2f001d5e3f44c
parent9bf89f80ce04630beb131163fd6e77441c22be78 (diff)
downloadtor-02068c6391fc5b9febac1f02de7028688c92eee2.tar.gz
tor-02068c6391fc5b9febac1f02de7028688c92eee2.zip
For fuzzing: Expose directory_handle_command.
(Nick extracted this patch from a larger patch by Teor.)
-rw-r--r--src/or/directory.c4
-rw-r--r--src/or/directory.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 80f53c28f4..458116336b 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -14,6 +14,7 @@
#include "connection.h"
#include "connection_edge.h"
#include "control.h"
+#define DIRECTORY_PRIVATE
#include "directory.h"
#include "dirserv.h"
#include "dirvote.h"
@@ -99,7 +100,6 @@ static void directory_send_command(dir_connection_t *conn,
int purpose, int direct, const char *resource,
const char *payload, size_t payload_len,
time_t if_modified_since);
-static int directory_handle_command(dir_connection_t *conn);
static int body_is_plausible(const char *body, size_t body_len, int purpose);
static char *http_get_header(const char *headers, const char *which);
static void http_set_address_origin(const char *headers, connection_t *conn);
@@ -3846,7 +3846,7 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers,
* from the inbuf, try to process it; otherwise, leave it on the
* buffer. Return a 0 on success, or -1 on error.
*/
-static int
+STATIC int
directory_handle_command(dir_connection_t *conn)
{
char *headers=NULL, *body=NULL;
diff --git a/src/or/directory.h b/src/or/directory.h
index ee0a198c52..15010d6ff7 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -148,6 +148,7 @@ int purpose_needs_anonymity(uint8_t dir_purpose, uint8_t router_purpose,
struct get_handler_args_t;
STATIC int handle_get_hs_descriptor_v3(dir_connection_t *conn,
const struct get_handler_args_t *args);
+STATIC int directory_handle_command(dir_connection_t *conn);
#endif