aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-09-25 05:17:11 +0000
committerNick Mathewson <nickm@torproject.org>2003-09-25 05:17:11 +0000
commit3d4ccb781ae5d74f0e16a63c89e08459d15cccf1 (patch)
tree3e9f214701c4a09bc45b453374bd6806f253a1a4 /src/or/cpuworker.c
parenta3bd8b5483bfb3813ba814c8d73840ca993e0298 (diff)
downloadtor-3d4ccb781ae5d74f0e16a63c89e08459d15cccf1.tar.gz
tor-3d4ccb781ae5d74f0e16a63c89e08459d15cccf1.zip
Refactor buffers; implement descriptors.
'buf_t' is now an opaque type defined in buffers.c . Router descriptors now include all keys; routers generate keys as needed on startup (in a newly defined "data directory"), and generate their own descriptors. Descriptors are now self-signed. Implementation is not complete: descriptors are never published; and upon receiving a descriptor, the directory doesn't do anything with it. At least "routers.or" and orkeygen are now obsolete, BTW. svn:r483
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 6cf21e861b..d3d945e7e6 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -73,9 +73,9 @@ int connection_cpu_process_inbuf(connection_t *conn) {
}
if(conn->state == CPUWORKER_STATE_BUSY_ONION) {
- if(conn->inbuf_datalen < LEN_ONION_RESPONSE) /* entire answer available? */
+ if(buf_datalen(conn->inbuf) < LEN_ONION_RESPONSE) /* entire answer available? */
return 0; /* not yet */
- assert(conn->inbuf_datalen == LEN_ONION_RESPONSE);
+ assert(buf_datalen(conn->inbuf) == LEN_ONION_RESPONSE);
connection_fetch_from_buf(buf,LEN_ONION_RESPONSE,conn);
@@ -147,7 +147,7 @@ int cpuworker_main(void *data) {
}
if(question_type == CPUWORKER_TASK_ONION) {
- if(onion_skin_server_handshake(question, get_privatekey(),
+ if(onion_skin_server_handshake(question, get_onion_key(),
reply_to_proxy, keys, 32) < 0) {
/* failure */
log_fn(LOG_ERR,"onion_skin_server_handshake failed.");