aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-01-12 18:04:17 +0000
committerNick Mathewson <nickm@torproject.org>2006-01-12 18:04:17 +0000
commit2dd566d5d589ca8e758e28d1ffb961b7d4975571 (patch)
treed325912376183d50d3ab1f27c5c4d66806337619 /src/or/directory.c
parent1f7ee33d1c30bf98181b48ebda26d0181994a08a (diff)
downloadtor-2dd566d5d589ca8e758e28d1ffb961b7d4975571.tar
tor-2dd566d5d589ca8e758e28d1ffb961b7d4975571.tar.gz
Indirect access to the signed_descriptor field to make it easier to keep them lazily on disk.
svn:r5827
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 59a87ef73..4e278d182 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1516,8 +1516,8 @@ directory_handle_command_get(connection_t *conn, char *headers,
char *cp = inp;
SMARTLIST_FOREACH(descs, signed_descriptor_t *, ri,
{
- memcpy(cp, ri->signed_descriptor,
- ri->signed_descriptor_len);
+ const char *body = signed_descriptor_get_body(ri);
+ memcpy(cp, body, ri->signed_descriptor_len);
cp += ri->signed_descriptor_len;
*cp++ = '\n';
});
@@ -1550,9 +1550,10 @@ directory_handle_command_get(connection_t *conn, char *headers,
note_request(request_type, len);
connection_write_to_buf(tmp, strlen(tmp), conn);
SMARTLIST_FOREACH(descs, signed_descriptor_t *, ri,
- connection_write_to_buf(ri->signed_descriptor,
- ri->signed_descriptor_len,
- conn));
+ {
+ const char *body = signed_descriptor_get_body(ri);
+ connection_write_to_buf(body, ri->signed_descriptor_len, conn);
+ });
}
}
smartlist_free(descs);