From 2dda97e8fd89875739b5f57f556c748ce7f5925f Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 20 Aug 2003 23:05:22 +0000 Subject: implemented cpuworkers please poke at it and report bugs still needs polishing, and only handles onions now (should handle OR handshakes too) svn:r402 --- src/or/command.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/or/command.c') 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) { -- cgit v1.2.3-54-g00ecf