aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_ap.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-02-18 01:35:55 +0000
committerRoger Dingledine <arma@torproject.org>2003-02-18 01:35:55 +0000
commit1714ea2ab87b7ee4ee393ad41b9f9cbf543c29cc (patch)
treeea0fc98ee6c2d1808af7ffec7fd18d6b38086425 /src/or/connection_ap.c
parent584a4fc4dd84335932b57621446930ed4bd9d4e8 (diff)
downloadtor-1714ea2ab87b7ee4ee393ad41b9f9cbf543c29cc.tar
tor-1714ea2ab87b7ee4ee393ad41b9f9cbf543c29cc.tar.gz
Bugfixes and enhancements in sendmes and dns farm
svn:r161
Diffstat (limited to 'src/or/connection_ap.c')
-rw-r--r--src/or/connection_ap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c
index 2173d0998..43bf960c6 100644
--- a/src/or/connection_ap.c
+++ b/src/or/connection_ap.c
@@ -128,6 +128,7 @@ int ap_handshake_process_socks(connection_t *conn) {
/* now we're all ready to make an onion or send a begin */
if(circ && circ->state == CIRCUIT_STATE_OPEN) {
+ /* FIXME if circ not yet open, figure out how to queue this begin? */
/* add it into the linked list of topics on this circuit */
log(LOG_DEBUG,"ap_handshake_process_socks(): attaching new conn to circ. n_aci %d.", circ->n_aci);
conn->next_topic = circ->p_conn;
@@ -308,12 +309,12 @@ int ap_handshake_send_onion(connection_t *ap_conn, connection_t *n_conn, circuit
if(dataleft >= CELL_PAYLOAD_SIZE) {
cell.length = CELL_PAYLOAD_SIZE;
memcpy(cell.payload, tmpbuf + tmpbuflen - dataleft, CELL_PAYLOAD_SIZE);
- connection_write_cell_to_buf(&cell, n_conn); /* clobbers cell */
+ connection_write_cell_to_buf(&cell, n_conn);
dataleft -= CELL_PAYLOAD_SIZE;
} else { /* last cell */
cell.length = dataleft;
memcpy(cell.payload, tmpbuf + tmpbuflen - dataleft, dataleft);
- connection_write_cell_to_buf(&cell, n_conn); /* clobbers cell */
+ connection_write_cell_to_buf(&cell, n_conn);
dataleft = 0;
}
}
@@ -383,7 +384,7 @@ int connection_ap_process_data_cell(cell_t *cell, circuit_t *circ) {
topic_id = ntohs(*(uint16_t *)(cell->payload+2));
log(LOG_DEBUG,"connection_ap_process_data_cell(): command %d topic %d", topic_command, topic_id);
num_seen++;
- log(LOG_DEBUG,"connection_exit_process_data_cell(): Now seen %d data cells here.", num_seen);
+ log(LOG_DEBUG,"connection_ap_process_data_cell(): Now seen %d data cells here.", num_seen);
circuit_consider_sending_sendme(circ, EDGE_AP);
@@ -452,7 +453,7 @@ int connection_ap_process_data_cell(cell_t *cell, circuit_t *circ) {
break;
case TOPIC_COMMAND_SENDME:
if(!conn) {
- log(LOG_DEBUG,"connection_exit_process_data_cell(): sendme cell dropped, unknown topic %d.",topic_id);
+ log(LOG_DEBUG,"connection_ap_process_data_cell(): sendme cell dropped, unknown topic %d.",topic_id);
return 0;
}
conn->p_receive_topicwindow += TOPICWINDOW_INCREMENT;