[tor-commits] [tor/master] Expose a few more dump_desc()-related things to the test suite

nickm at torproject.org nickm at torproject.org
Thu Jun 30 15:18:32 UTC 2016


commit 35fc5879fb15177581284537f5b5286110590555
Author: Andrea Shepard <andrea at torproject.org>
Date:   Sat Jun 25 07:47:53 2016 +0000

    Expose a few more dump_desc()-related things to the test suite
---
 src/or/routerparse.c | 6 +++---
 src/or/routerparse.h | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index eacf9aa..5f1dde4 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -588,9 +588,9 @@ static int check_signature_token(const char *digest,
 /* Dump mechanism for unparseable descriptors */
 
 /** List of dumped descriptors for FIFO cleanup purposes */
-static smartlist_t *descs_dumped = NULL;
+STATIC smartlist_t *descs_dumped = NULL;
 /** Total size of dumped descriptors for FIFO cleanup */
-static size_t len_descs_dumped = 0;
+STATIC size_t len_descs_dumped = 0;
 
 /*
  * One entry in the list of dumped descriptors; filename dumped to, length
@@ -715,7 +715,7 @@ dump_desc_fifo_bump_hash(const uint8_t *digest_sha256)
 
 /** Clean up on exit; just memory, leave the dumps behind
  */
-static void
+STATIC void
 dump_desc_fifo_cleanup(void)
 {
   if (descs_dumped) {
diff --git a/src/or/routerparse.h b/src/or/routerparse.h
index fe32fb7..2b18143 100644
--- a/src/or/routerparse.h
+++ b/src/or/routerparse.h
@@ -88,11 +88,14 @@ int rend_parse_client_keys(strmap_t *parsed_clients, const char *str);
 void routerparse_free_all(void);
 
 #ifdef ROUTERPARSE_PRIVATE
+EXTERN(size_t, len_descs_dumped);
+EXTERN(smartlist_t *, descs_dumped);
 STATIC int routerstatus_parse_guardfraction(const char *guardfraction_str,
                                             networkstatus_t *vote,
                                             vote_routerstatus_t *vote_rs,
                                             routerstatus_t *rs);
 STATIC void dump_desc(const char *desc, const char *type);
+STATIC void dump_desc_fifo_cleanup(void);
 #endif
 
 #define ED_DESC_SIGNATURE_PREFIX "Tor router descriptor signature v1"





More information about the tor-commits mailing list