Tor  0.4.6.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-2020, 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 }
dircache.h
Header file for dircache.c.
consdiffmgr_add_consensus
int consdiffmgr_add_consensus(const char *consensus, size_t consensus_len, const networkstatus_t *as_parsed)
Definition: dircache_stub.c:49
consdiffmgr_free_all
void consdiffmgr_free_all(void)
Definition: dircache_stub.c:73
consdiffmgr_enable_background_compression
void consdiffmgr_enable_background_compression(void)
Definition: dircache_stub.c:44
dirserv.h
Header file for dirserv.c.
dir_connection_st.h
Client/server directory connection structure.
consdiffmgr_cleanup
int consdiffmgr_cleanup(void)
Definition: dircache_stub.c:67
consdiffmgr_register_with_sandbox
int consdiffmgr_register_with_sandbox(struct sandbox_cfg_elem_t **cfg)
Definition: dircache_stub.c:60
directory_handle_command
int directory_handle_command(dir_connection_t *conn)
Definition: dircache_stub.c:19
dir_connection_t
Definition: dir_connection_st.h:21
networkstatus_t
Definition: networkstatus_st.h:26
or.h
Master header file for Tor-specific functionality.
consdiffmgr.h
Header for consdiffmgr.c.