diff options
author | Roger Dingledine <arma@torproject.org> | 2003-08-20 23:05:22 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-08-20 23:05:22 +0000 |
commit | 2dda97e8fd89875739b5f57f556c748ce7f5925f (patch) | |
tree | fbdaec39c6d49cf73f85ffff1997fd1a5ac96d1a /src/or/command.c | |
parent | d43f145ddfd48ef2ccfecabcb96d68061ba55a00 (diff) | |
download | tor-2dda97e8fd89875739b5f57f556c748ce7f5925f.tar.gz tor-2dda97e8fd89875739b5f57f556c748ce7f5925f.zip |
implemented cpuworkers
please poke at it and report bugs
still needs polishing, and only handles onions now (should handle
OR handshakes too)
svn:r402
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/or/command.c b/src/or/command.c index ee14cce124..f38708e2f3 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -97,13 +97,13 @@ void command_process_create_cell(cell_t *cell, connection_t *conn) { memcpy(circ->onionskin,cell->payload,cell->length); - /* add it to the pending onions queue, and then return */ - if(onion_pending_add(circ) < 0) { - log_fn(LOG_DEBUG,"Failed to queue onionskin. Closing."); + /* hand it off to the cpuworkers, and then return */ + if(assign_to_cpuworker(NULL, CPUWORKER_TASK_ONION, circ) < 0) { + log_fn(LOG_DEBUG,"Failed to hand off onionskin. Closing."); circuit_close(circ); + return; } - log_fn(LOG_DEBUG,"success: queued onionskin."); - return; + log_fn(LOG_DEBUG,"success: handed off onionskin."); } void command_process_created_cell(cell_t *cell, connection_t *conn) { @@ -153,7 +153,6 @@ void command_process_created_cell(cell_t *cell, connection_t *conn) { return; } } - return; } void command_process_relay_cell(cell_t *cell, connection_t *conn) { |