diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-03-13 15:38:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-03-28 19:55:03 +0200 |
commit | 8aa69a1b69b64185333fb1b6e74d55fc5e341fd8 (patch) | |
tree | 376215dbef2ca72b2638956fabd14f6294c33bbc /src/or/directory.h | |
parent | 8587f663ee5f8f4af4fbbd5542116eb22ed1814e (diff) | |
download | tor-8aa69a1b69b64185333fb1b6e74d55fc5e341fd8.tar.gz tor-8aa69a1b69b64185333fb1b6e74d55fc5e341fd8.zip |
Refactor the directory spool implementation
The old implementation had duplicated code in a bunch of places, and
it interspersed spool-management with resource management. The new
implementation should make it easier to add new resource types and
maintain the spooling code.
Closing ticket 21651.
Diffstat (limited to 'src/or/directory.h')
-rw-r--r-- | src/or/directory.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/directory.h b/src/or/directory.h index 8be1f8e76e..a45a0aa3f7 100644 --- a/src/or/directory.h +++ b/src/or/directory.h @@ -66,7 +66,7 @@ void directory_initiate_command_routerstatus_rend(const routerstatus_t *status, int parse_http_response(const char *headers, int *code, time_t *date, compress_method_t *compression, char **response); -int connection_dir_is_encrypted(dir_connection_t *conn); +int connection_dir_is_encrypted(const dir_connection_t *conn); int connection_dir_reached_eof(dir_connection_t *conn); int connection_dir_process_inbuf(dir_connection_t *conn); int connection_dir_finished_flushing(dir_connection_t *conn); @@ -88,7 +88,12 @@ void directory_initiate_command(const tor_addr_t *or_addr, uint16_t or_port, int dir_split_resource_into_fingerprints(const char *resource, smartlist_t *fp_out, int *compressed_out, int flags); - +enum dir_spool_source_t; +int dir_split_resource_into_spoolable(const char *resource, + enum dir_spool_source_t source, + smartlist_t *spool_out, + int *compressed_out, + int flags); int dir_split_resource_into_fingerprint_pairs(const char *res, smartlist_t *pairs_out); char *directory_dump_request_log(void); |