summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-03-28 19:55:18 +0200
committerNick Mathewson <nickm@torproject.org>2017-03-28 19:55:18 +0200
commit208c2a5c74e5ae4e53a9c6555f5519816826d490 (patch)
treed7b01b05afdeb890714c77391c7705a8e0727b23 /src/or/or.h
parent4d5b46aad91daeafd9c3f9d703f3b0b7b47ad472 (diff)
parent003a7fe2a390615df9f700193ab0fe52fa4ade93 (diff)
downloadtor-208c2a5c74e5ae4e53a9c6555f5519816826d490.tar.gz
tor-208c2a5c74e5ae4e53a9c6555f5519816826d490.zip
Merge branch 'spooling_squashed'
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 9b0ccaffa0..d592e4b91c 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1751,14 +1751,6 @@ typedef struct entry_connection_t {
unsigned int is_socks_socket:1;
} entry_connection_t;
-typedef enum {
- DIR_SPOOL_NONE=0, DIR_SPOOL_SERVER_BY_DIGEST, DIR_SPOOL_SERVER_BY_FP,
- DIR_SPOOL_EXTRA_BY_DIGEST, DIR_SPOOL_EXTRA_BY_FP,
- DIR_SPOOL_CACHED_DIR, DIR_SPOOL_NETWORKSTATUS,
- DIR_SPOOL_MICRODESC, /* NOTE: if we add another entry, add another bit. */
-} dir_spool_source_t;
-#define dir_spool_source_bitfield_t ENUM_BF(dir_spool_source_t)
-
/** Subtype of connection_t for an "directory connection" -- that is, an HTTP
* connection to retrieve or serve directory material. */
typedef struct dir_connection_t {
@@ -1773,21 +1765,13 @@ typedef struct dir_connection_t {
char *requested_resource;
unsigned int dirconn_direct:1; /**< Is this dirconn direct, or via Tor? */
- /* Used only for server sides of some dir connections, to implement
- * "spooling" of directory material to the outbuf. Otherwise, we'd have
- * to append everything to the outbuf in one enormous chunk. */
- /** What exactly are we spooling right now? */
- dir_spool_source_bitfield_t dir_spool_src : 3;
-
/** If we're fetching descriptors, what router purpose shall we assign
* to them? */
uint8_t router_purpose;
- /** List of fingerprints for networkstatuses or descriptors to be spooled. */
- smartlist_t *fingerprint_stack;
- /** A cached_dir_t object that we're currently spooling out */
- struct cached_dir_t *cached_dir;
- /** The current offset into cached_dir. */
- off_t cached_dir_offset;
+
+ /** List of spooled_resource_t for objects that we're spooling. We use
+ * it from back to front. */
+ smartlist_t *spool;
/** The zlib object doing on-the-fly compression for spooled data. */
tor_zlib_state_t *zlib_state;