Tor  0.4.7.0-alpha-dev
dircache_stub.c
Go to the documentation of this file.
1 /* Copyright (c) 2001-2004, Roger Dingledine.
2  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
3  * Copyright (c) 2007-2021, The Tor Project, Inc. */
4 /* See LICENSE for licensing information */
5 
6 /**
7  * @file dircache_stub.c
8  * @brief Stub declarations for use when dircache module is disabled.
9  **/
10 
11 #include "core/or/or.h"
16 
17 DISABLE_GCC_WARNING("-Wmissing-noreturn")
18 int
20 {
21  (void) conn;
22  tor_assert_nonfatal_unreached_once();
23  return -1;
24 }
25 
26 int
27 connection_dirserv_flushed_some(dir_connection_t *conn)
28 {
29  (void) conn;
30  tor_assert_nonfatal_unreached_once();
31  return -1;
32 }
33 ENABLE_GCC_WARNING("-Wmissing-noreturn")
34 
35 void
36 dir_conn_clear_spool(dir_connection_t *conn)
37 {
38  if (!conn)
39  return;
40  tor_assert_nonfatal_once(conn->spool == NULL);
41 }
42 
43 void
45 {
46 }
47 
48 int
49 consdiffmgr_add_consensus(const char *consensus,
50  size_t consensus_len,
51  const networkstatus_t *as_parsed)
52 {
53  (void)consensus;
54  (void)consensus_len;
55  (void)as_parsed;
56  return 0;
57 }
58 
59 int
60 consdiffmgr_register_with_sandbox(struct sandbox_cfg_elem_t **cfg)
61 {
62  (void)cfg;
63  return 0;
64 }
65 
66 int
68 {
69  return 0;
70 }
71 
72 void
74 {
75 }
76 
77 void
78 dirserv_free_all(void)
79 {
80 }
Header for consdiffmgr.c.
Client/server directory connection structure.
Header file for dircache.c.
int directory_handle_command(dir_connection_t *conn)
Definition: dircache_stub.c:19
void consdiffmgr_enable_background_compression(void)
Definition: dircache_stub.c:44
int consdiffmgr_cleanup(void)
Definition: dircache_stub.c:67
int consdiffmgr_add_consensus(const char *consensus, size_t consensus_len, const networkstatus_t *as_parsed)
Definition: dircache_stub.c:49
void consdiffmgr_free_all(void)
Definition: dircache_stub.c:73
int consdiffmgr_register_with_sandbox(struct sandbox_cfg_elem_t **cfg)
Definition: dircache_stub.c:60
Header file for dirserv.c.
Master header file for Tor-specific functionality.