aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-06-13 09:59:33 +0000
committerRoger Dingledine <arma@torproject.org>2003-06-13 09:59:33 +0000
commit9a33b59ece152692acf25c8e98bf5ec46e1474c0 (patch)
tree7d9fa49ebf2f2151a85f4cc5d5d3d3d467c64cb1 /src/or/onion.c
parent1454f4aded3bb2b99d59d7f2bf1fb636403b17d8 (diff)
downloadtor-9a33b59ece152692acf25c8e98bf5ec46e1474c0.tar.gz
tor-9a33b59ece152692acf25c8e98bf5ec46e1474c0.zip
relay queues are obsolete (woo!)
they used to be used for * queueing relay cells at the edge of the network, when windows are empty * queueing relay cells that arrive after an onion but before the onion has been processed. both of these uses are gone. so out they go. svn:r315
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index d1bda37e23..77bc624dd8 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -67,7 +67,6 @@ int onion_pending_check(void) {
}
void onion_pending_process_one(void) {
- struct relay_queue_t *tmpd;
circuit_t *circ;
if(!ol_list)
@@ -88,11 +87,7 @@ void onion_pending_process_one(void) {
onion_pending_remove(circ);
circuit_close(circ);
} else {
- log(LOG_DEBUG,"onion_pending_process_one(): Succeeded. Delivering queued relay cells.");
- for(tmpd = ol_list->relay_cells; tmpd; tmpd=tmpd->next) {
- log(LOG_DEBUG,"onion_pending_process_one(): Delivering relay cell...");
- command_process_relay_cell(tmpd->cell, circ->p_conn);
- }
+ log(LOG_DEBUG,"onion_pending_process_one(): Succeeded.");
onion_pending_remove(circ);
}
return;
@@ -103,7 +98,6 @@ void onion_pending_process_one(void) {
*/
void onion_pending_remove(circuit_t *circ) {
struct onion_queue_t *tmpo, *victim;
- struct relay_queue_t *tmpd;
if(!ol_list)
return; /* nothing here. */
@@ -133,49 +127,7 @@ void onion_pending_remove(circuit_t *circ) {
/* now victim points to the element that needs to be removed */
- /* first dump the attached relay cells too, if any */
- while(victim->relay_cells) {
- tmpd = victim->relay_cells;
- victim->relay_cells = tmpd->next;
- free(tmpd->cell);
- free(tmpd);
- }
-
free(victim);
-
-}
-
-struct relay_queue_t *relay_queue_add(struct relay_queue_t *list, cell_t *cell, crypt_path_t *layer_hint) {
- struct relay_queue_t *tmpd, *newd;
-
- newd = tor_malloc(sizeof(struct relay_queue_t));
- memset(newd, 0, sizeof(struct relay_queue_t));
- newd->cell = tor_malloc(sizeof(cell_t));
- memcpy(newd->cell, cell, sizeof(cell_t));
- newd->layer_hint = layer_hint;
-
- if(!list) {
- return newd;
- }
- for(tmpd = list; tmpd->next; tmpd=tmpd->next) ;
- /* now tmpd->next is null */
- tmpd->next = newd;
- return list;
-}
-
-/* a relay cell has arrived for a circuit which is still pending. Find
- * the right entry in ol_list, and add it to the end of the 'relay_cells'
- * list.
- */
-void onion_pending_relay_add(circuit_t *circ, cell_t *cell) {
- struct onion_queue_t *tmpo;
-
- for(tmpo=ol_list; tmpo; tmpo=tmpo->next) {
- if(tmpo->circ == circ) {
- tmpo->relay_cells = relay_queue_add(tmpo->relay_cells, cell, NULL);
- return;
- }
- }
}
/* learn keys, initialize, then send a created cell back */