comparison freeDiameter/sctps.c @ 543:40141acabee7

Fix behavior of TLS/SCTP when only one peer does not accept the remote certificate
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 14 Sep 2010 13:31:27 +0900
parents 7250e91f0662
children
comparison
equal deleted inserted replaced
542:0b6cee362f5d 543:40141acabee7
595 } 595 }
596 596
597 return 0; 597 return 0;
598 } 598 }
599 599
600 /* Receive messages from all stream pairs */ 600 /* Receive messages from others ? all other stream pairs : the master pair */
601 int fd_sctps_startthreads(struct cnxctx * conn) 601 int fd_sctps_startthreads(struct cnxctx * conn, int others)
602 { 602 {
603 uint16_t i; 603 uint16_t i;
604 604
605 TRACE_ENTRY("%p", conn); 605 TRACE_ENTRY("%p", conn);
606 CHECK_PARAMS( conn && conn->cc_sctps_data.array ); 606 CHECK_PARAMS( conn && conn->cc_sctps_data.array );
607 607
608 for (i = 0; i < conn->cc_sctp_para.pairs; i++) { 608 if (others) {
609 609 for (i = 1; i < conn->cc_sctp_para.pairs; i++) {
610 /* Start the decipher thread */ 610
611 CHECK_POSIX( pthread_create( &conn->cc_sctps_data.array[i].thr, NULL, decipher, &conn->cc_sctps_data.array[i] ) ); 611 /* Start the decipher thread */
612 CHECK_POSIX( pthread_create( &conn->cc_sctps_data.array[i].thr, NULL, decipher, &conn->cc_sctps_data.array[i] ) );
613 }
614 } else {
615 CHECK_POSIX( pthread_create( &conn->cc_sctps_data.array[0].thr, NULL, decipher, &conn->cc_sctps_data.array[0] ) );
612 } 616 }
613 return 0; 617 return 0;
614 } 618 }
615 619
616 /* Initiate a "bye" on all stream pairs */ 620 /* Initiate a "bye" on all stream pairs */
"Welcome to our mercurial repository"