summaryrefslogtreecommitdiff
path: root/src/feature/dircommon/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-17 07:50:50 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-17 07:50:50 -0500
commitabd9ae48ac2306dc2784d9af2b34b883d83534f4 (patch)
tree9559f618ef26613158dab01a85d8f450f9903afb /src/feature/dircommon/directory.c
parent01fdc3240f59f2d9a682b3c2a2d58db01d0bd7a3 (diff)
parent3c89622e39d964b731a40c6a705327d5caa07be4 (diff)
downloadtor-abd9ae48ac2306dc2784d9af2b34b883d83534f4.tar.gz
tor-abd9ae48ac2306dc2784d9af2b34b883d83534f4.zip
Merge branch 'ticket32487_squashed_and_merged'
Diffstat (limited to 'src/feature/dircommon/directory.c')
-rw-r--r--src/feature/dircommon/directory.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/feature/dircommon/directory.c b/src/feature/dircommon/directory.c
index f65d3eec0c..b177fe5201 100644
--- a/src/feature/dircommon/directory.c
+++ b/src/feature/dircommon/directory.c
@@ -702,34 +702,3 @@ dir_split_resource_into_fingerprints(const char *resource,
smartlist_free(fp_tmp);
return 0;
}
-
-/** As dir_split_resource_into_fingerprints, but instead fills
- * <b>spool_out</b> with a list of spoolable_resource_t for the resource
- * identified through <b>source</b>. */
-int
-dir_split_resource_into_spoolable(const char *resource,
- dir_spool_source_t source,
- smartlist_t *spool_out,
- int *compressed_out,
- int flags)
-{
- smartlist_t *fingerprints = smartlist_new();
-
- tor_assert(flags & (DSR_HEX|DSR_BASE64));
- const size_t digest_len =
- (flags & DSR_DIGEST256) ? DIGEST256_LEN : DIGEST_LEN;
-
- int r = dir_split_resource_into_fingerprints(resource, fingerprints,
- compressed_out, flags);
- /* This is not a very efficient implementation XXXX */
- SMARTLIST_FOREACH_BEGIN(fingerprints, uint8_t *, digest) {
- spooled_resource_t *spooled =
- spooled_resource_new(source, digest, digest_len);
- if (spooled)
- smartlist_add(spool_out, spooled);
- tor_free(digest);
- } SMARTLIST_FOREACH_END(digest);
-
- smartlist_free(fingerprints);
- return r;
-}