[or-cvs] Adjust straggling users of payload field
Nick Mathewson
nickm at seul.org
Thu Apr 17 17:25:34 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv26922/src/or
Modified Files:
connection.c connection_edge.c onion.c
Log Message:
Adjust straggling users of payload field
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- connection.c 17 Apr 2003 17:10:40 -0000 1.56
+++ connection.c 17 Apr 2003 17:25:32 -0000 1.57
@@ -670,7 +670,7 @@
* compressing.
* 2)
*/
- len = connection_compress_from_buf(cell.payload,
+ len = connection_compress_from_buf(cell.payload+TOPIC_HEADER_SIZE,
CELL_PAYLOAD_SIZE - TOPIC_HEADER_SIZE,
conn, Z_SYNC_FLUSH);
if (len < 0)
@@ -684,7 +684,8 @@
cell.length = amount_to_process;
}
- if(connection_fetch_from_buf(cell.payload, cell.length, conn) < 0)
+ if(connection_fetch_from_buf(cell.payload+TOPIC_HEADER_SIZE,
+ cell.length, conn) < 0)
return -1;
#endif
Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- connection_edge.c 17 Apr 2003 17:10:40 -0000 1.4
+++ connection_edge.c 17 Apr 2003 17:25:32 -0000 1.5
@@ -153,7 +153,7 @@
}
#ifdef USE_ZLIB
- if(connection_decompress_to_buf(cell->payload,
+ if(connection_decompress_to_buf(cell->payload + TOPIC_HEADER_SIZE,
cell->length - TOPIC_HEADER_SIZE,
conn, Z_SYNC_FLUSH) < 0) {
log(LOG_INFO,"connection_edge_process_data_cell(): write to buf failed. Marking for close.");
@@ -161,7 +161,7 @@
return 0;
}
#else
- if(connection_write_to_buf(cell->payload,
+ if(connection_write_to_buf(cell->payload + TOPIC_HEADER_SIZE,
cell->length - TOPIC_HEADER_SIZE, conn) < 0) {
conn->marked_for_close = 1;
return 0;
Index: onion.c
===================================================================
RCS file: /home/or/cvsroot/src/or/onion.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- onion.c 17 Apr 2003 17:10:40 -0000 1.37
+++ onion.c 17 Apr 2003 17:25:32 -0000 1.38
@@ -310,7 +310,6 @@
int chooselen(double cw)
{
int len = 2;
- int retval = 0;
uint8_t coin;
if ((cw < 0) || (cw >= 1)) /* invalid parameter */
More information about the tor-commits
mailing list