Browse Source

get rid of those nasty tabs

svn:r216
Roger Dingledine 21 years ago
parent
commit
b8da74d30a
3 changed files with 23 additions and 23 deletions
  1. 9 9
      src/or/buffers.c
  2. 12 12
      src/or/connection.c
  3. 2 2
      src/or/connection_exit.c

+ 9 - 9
src/or/buffers.c

@@ -138,8 +138,8 @@ int write_to_buf(char *string, int string_len,
 
 #ifdef USE_ZLIB
 int compress_from_buf(char *string, int string_len, 
-		      char **buf_in, int *buflen_in, int *buf_datalen_in,
-		      z_stream *zstream, int flush) {
+                      char **buf_in, int *buflen_in, int *buf_datalen_in,
+                      z_stream *zstream, int flush) {
   int err;
 
   if (!*buf_datalen_in)
@@ -157,8 +157,8 @@ int compress_from_buf(char *string, int string_len,
     case Z_OK:
     case Z_STREAM_END:
       log(LOG_DEBUG, "Compressed (%d/%d); filled (%d/%d).",
-	  *buf_datalen_in-zstream->avail_in, *buf_datalen_in,
-	  string_len-zstream->avail_out, string_len);
+          *buf_datalen_in-zstream->avail_in, *buf_datalen_in,
+          string_len-zstream->avail_out, string_len);
       memmove(*buf_in, zstream->next_in, zstream->avail_in);
       *buf_datalen_in = zstream->avail_in;
       return string_len - zstream->avail_out;
@@ -173,8 +173,8 @@ int compress_from_buf(char *string, int string_len,
 }
 
 int decompress_buf_to_buf(char **buf_in, int *buflen_in, int *buf_datalen_in,
-			  char **buf_out, int *buflen_out, int *buf_datalen_out,
-			  z_stream *zstream, int flush) 
+                          char **buf_out, int *buflen_out, int *buf_datalen_out,
+                          z_stream *zstream, int flush) 
 {
   int err;
 
@@ -193,9 +193,9 @@ int decompress_buf_to_buf(char **buf_in, int *buflen_in, int *buf_datalen_in,
     case Z_OK:
     case Z_STREAM_END:
       log(LOG_DEBUG, "Uncompressed (%d/%d); filled (%d/%d)",
-	  *buf_datalen_in-zstream->avail_in, *buf_datalen_in,
-	  (*buflen_out-*buf_datalen_out)-zstream->avail_out, 
-	  (*buflen_out-*buf_datalen_out) );
+          *buf_datalen_in-zstream->avail_in, *buf_datalen_in,
+          (*buflen_out-*buf_datalen_out)-zstream->avail_out, 
+          (*buflen_out-*buf_datalen_out) );
       memmove(*buf_in, zstream->next_in, zstream->avail_in);
       *buf_datalen_in = zstream->avail_in;
       *buf_datalen_out = *buflen_out - zstream->avail_out;

+ 12 - 12
src/or/connection.c

@@ -180,10 +180,10 @@ void connection_free(connection_t *conn) {
   if (conn->compression) {
     if (inflateEnd(conn->decompression) != Z_OK)
       log(LOG_ERR,"connection_free(): while closing zlib: %s",
-	  conn->decompression->msg);
+          conn->decompression->msg);
     if (deflateEnd(conn->compression) != Z_OK)
       log(LOG_ERR,"connection_free(): while closing zlib: %s",
-	  conn->compression->msg);
+          conn->compression->msg);
     free(conn->compression);
     free(conn->decompression);
     buf_free(conn->z_outbuf);
@@ -372,14 +372,14 @@ int connection_fetch_from_buf(char *string, int len, connection_t *conn) {
 
 #ifdef USE_ZLIB
 int connection_compress_from_buf(char *string, int len, connection_t *conn,
-				 int flush) {
+                                 int flush) {
   return compress_from_buf(string, len,
-			   &conn->inbuf, &conn->inbuflen, &conn->inbuf_datalen,
-			   conn->compression, flush);
+                           &conn->inbuf, &conn->inbuflen, &conn->inbuf_datalen,
+                           conn->compression, flush);
 }
 
 int connection_decompress_to_buf(char *string, int len, connection_t *conn,
-				 int flush) {
+                                 int flush) {
   int n;
   struct timeval now;
 
@@ -387,7 +387,7 @@ int connection_decompress_to_buf(char *string, int len, connection_t *conn,
 
   if (len) {
     if (write_to_buf(string, len, 
-		     &conn->z_outbuf, &conn->z_outbuflen, &conn->z_outbuf_datalen) < 0)
+        &conn->z_outbuf, &conn->z_outbuflen, &conn->z_outbuf_datalen) < 0)
       return -1;
   }
 
@@ -400,9 +400,9 @@ int connection_decompress_to_buf(char *string, int len, connection_t *conn,
     return 0;
   
   n = decompress_buf_to_buf(
-	   &conn->z_outbuf, &conn->z_outbuflen, &conn->z_outbuf_datalen,
-	   &conn->outbuf, &conn->outbuflen, &conn->outbuf_datalen,
-	   conn->decompression, flush);
+        &conn->z_outbuf, &conn->z_outbuflen, &conn->z_outbuf_datalen,
+        &conn->outbuf, &conn->outbuflen, &conn->outbuf_datalen,
+        conn->decompression, flush);
 
   if (n < 0)
     return -1;
@@ -718,8 +718,8 @@ repeat_connection_package_raw_inbuf:
    *    2) 
    */
   len = connection_compress_from_buf(cell.payload + TOPIC_HEADER_SIZE,
-				     CELL_PAYLOAD_SIZE - TOPIC_HEADER_SIZE,
-				     conn, Z_SYNC_FLUSH);
+                                     CELL_PAYLOAD_SIZE - TOPIC_HEADER_SIZE,
+                                     conn, Z_SYNC_FLUSH);
   if (len < 0)
     return -1;
 

+ 2 - 2
src/or/connection_exit.c

@@ -252,8 +252,8 @@ int connection_exit_process_data_cell(cell_t *cell, circuit_t *circ) {
 #ifdef USE_ZLIB
       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);
+                                         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.");