aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2016-06-25 06:26:44 +0000
committerAndrea Shepard <andrea@torproject.org>2016-06-30 07:03:24 +0000
commit17ed2fed68ed18480976748e3f407bf6952ab72c (patch)
tree5951d5584830189ae725612a5dc65d634aa10737 /src/or/routerparse.c
parent726dc9acf599567bf2ed1786fc2af785f15cac25 (diff)
downloadtor-17ed2fed68ed18480976748e3f407bf6952ab72c.tar.gz
tor-17ed2fed68ed18480976748e3f407bf6952ab72c.zip
Expose dump_desc() to the test suite and make things it calls mockable
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 1d227fdc70..eacf9aa916 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -646,7 +646,7 @@ dump_desc_fifo_add_and_clean(char *filename, const uint8_t *digest_sha256,
*/
if (strcmp(tmp->filename, filename) != 0) {
/* Delete it and adjust the length counter */
- unlink(tmp->filename);
+ tor_unlink(tmp->filename);
tor_assert(len_descs_dumped >= tmp->len);
len_descs_dumped -= tmp->len;
log_info(LD_DIR,
@@ -736,7 +736,7 @@ dump_desc_fifo_cleanup(void)
* type *<b>type</b> to file $DATADIR/unparseable-desc. Do not write more
* than one descriptor to disk per minute. If there is already such a
* file in the data directory, overwrite it. */
-static void
+STATIC void
dump_desc(const char *desc, const char *type)
{
tor_assert(desc);