diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-03-19 22:47:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-03-19 22:47:34 +0000 |
commit | 29da03cbdc0c0bf46b54b30131632cdeed1adb63 (patch) | |
tree | bb6ddec190f6265e02b2230a738aba5334fb9f1b /src/or/connection_exit.c | |
parent | fceb45727602223d214e55d0474976f84141d8e1 (diff) | |
download | tor-29da03cbdc0c0bf46b54b30131632cdeed1adb63.tar tor-29da03cbdc0c0bf46b54b30131632cdeed1adb63.tar.gz |
Be loud when decompressing
svn:r213
Diffstat (limited to 'src/or/connection_exit.c')
-rw-r--r-- | src/or/connection_exit.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/connection_exit.c b/src/or/connection_exit.c index 24b1f21b4..b797d7198 100644 --- a/src/or/connection_exit.c +++ b/src/or/connection_exit.c @@ -196,6 +196,7 @@ int connection_exit_process_data_cell(cell_t *cell, circuit_t *circ) { connection_t *conn; int topic_command; int topic_id; + int len; static int num_seen=0; /* an outgoing data cell has arrived */ @@ -248,16 +249,19 @@ int connection_exit_process_data_cell(cell_t *cell, circuit_t *circ) { if(conn->state != EXIT_CONN_STATE_OPEN) { log(LOG_DEBUG,"connection_exit_process_data_cell(): data received while resolving/connecting. Queueing."); } - log(LOG_DEBUG,"connection_exit_process_data_cell(): put %d bytes on outbuf.",cell->length - TOPIC_HEADER_SIZE); #ifdef USE_ZLIB - if(connection_decompress_to_buf(cell->payload + TOPIC_HEADER_SIZE, - cell->length - TOPIC_HEADER_SIZE, - conn, Z_SYNC_FLUSH) < 0) { + log(LOG_DEBUG,"connection_exit_process_data_cell(): uncompressing %d bytes onto outbuf...",cell->length - TOPIC_HEADER_SIZE); + len = connection_decompress_to_buf(cell->payload + TOPIC_HEADER_SIZE, + cell->length - TOPIC_HEADER_SIZE, + conn, Z_SYNC_FLUSH); + log(LOG_DEBUG,"%d bytes written", len); + if (len<0) { log(LOG_INFO,"connection_exit_process_data_cell(): write to buf failed. Marking for close."); conn->marked_for_close = 1; return 0; } #else + log(LOG_DEBUG,"connection_exit_process_data_cell(): put %d bytes on outbuf.",cell->length - TOPIC_HEADER_SIZE); if(connection_write_to_buf(cell->payload + TOPIC_HEADER_SIZE, cell->length - TOPIC_HEADER_SIZE, conn) < 0) { log(LOG_INFO,"connection_exit_process_data_cell(): write to buf failed. Marking for close."); |