Changeset 3166
- Timestamp:
- Sep 25, 2007, 5:56:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/handshake.c
r3135 r3166 178 178 case AWAITING_HANDSHAKE: str = "awaiting handshake"; break; 179 179 case AWAITING_YA: str = "awaiting ya"; break; 180 //case SENDING_YB: str = "sending yb"; break;181 180 case AWAITING_PAD_A: str = "awaiting pad a"; break; 182 181 case AWAITING_CRYPTO_PROVIDE: str = "awaiting crypto_provide"; break; 183 182 case AWAITING_PAD_C: str = "awaiting pad c"; break; 184 183 case AWAITING_IA: str = "awaiting ia"; break; 185 //case SENDING_YA: str = "sending ya"; break;186 184 case AWAITING_YB: str = "awaiting yb"; break; 187 //case SENDING_CRYPTO_PROVIDE: str = "sending crypto provide"; break;188 185 case AWAITING_VC: str = "awaiting vc"; break; 189 186 case AWAITING_CRYPTO_SELECT: str = "awaiting crypto select"; break; 190 187 case AWAITING_PAD_D: str = "awaiting pad d"; break; 191 //case SENDING_NONE: str = "sending plaintext handshake"; break;192 188 } 193 189 return str; … … 205 201 { 206 202 setState( handshake, state ); 207 //tr_peerIoSetIOMode( handshake->io, EV_READ, EV_WRITE );208 203 } 209 204 … … 385 380 386 381 static uint32_t 387 getCryptoProvide( const tr_handshake * handshake )382 getCryptoProvide( const tr_handshake * handshake UNUSED ) 388 383 { 389 384 uint32_t i = 0; … … 391 386 i |= CRYPTO_PROVIDE_CRYPTO; /* always allow crypto */ 392 387 388 #if 0 393 389 if( handshake->allowUnencryptedPeers ) /* sometimes allow plaintext */ 394 390 i |= CRYPTO_PROVIDE_PLAINTEXT; 391 #endif 395 392 396 393 return i; … … 469 466 470 467 /* crypto_provide */ 471 crypto_provide = getCryptoProvide( handshake ); 472 crypto_provide = htonl( crypto_provide ); 468 crypto_provide = htonl( getCryptoProvide( handshake ) ); 473 469 tr_cryptoEncrypt( handshake->crypto, sizeof(crypto_provide), &crypto_provide, &crypto_provide ); 474 470 evbuffer_add( outbuf, &crypto_provide, sizeof(crypto_provide) );
Note: See TracChangeset
for help on using the changeset viewer.