]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
remove redundant unpack in critical path
authorNick Mathewson <nickm@torproject.org>
Sun, 13 Feb 2005 16:17:32 +0000 (16:17 +0000)
committerNick Mathewson <nickm@torproject.org>
Sun, 13 Feb 2005 16:17:32 +0000 (16:17 +0000)
svn:r3620

src/or/relay.c

index 39ef56caa29e7f7bd67add20c96fb150acc646a4..13ae5cb02d32f0357103e6ce7adc73d55c43a27e 100644 (file)
@@ -107,9 +107,9 @@ static int relay_digest_matches(crypto_digest_env_t *digest, cell_t *cell) {
 static int relay_crypt_one_payload(crypto_cipher_env_t *cipher, char *in,
                                    int encrypt_mode) {
   char out[CELL_PAYLOAD_SIZE]; /* 'in' must be this size too */
-  relay_header_t rh;
+//  relay_header_t rh;
 
-  relay_header_unpack(&rh, in);
+//  relay_header_unpack(&rh, in);
 //  log_fn(LOG_DEBUG,"before crypt: %d",rh.recognized);
   if (( encrypt_mode && crypto_cipher_encrypt(cipher, out, in, CELL_PAYLOAD_SIZE)) ||
       (!encrypt_mode && crypto_cipher_decrypt(cipher, out, in, CELL_PAYLOAD_SIZE))) {
@@ -117,7 +117,7 @@ static int relay_crypt_one_payload(crypto_cipher_env_t *cipher, char *in,
     return -1;
   }
   memcpy(in,out,CELL_PAYLOAD_SIZE);
-  relay_header_unpack(&rh, in);
+//  relay_header_unpack(&rh, in);
 //  log_fn(LOG_DEBUG,"after crypt: %d",rh.recognized);
   return 0;
 }