Navigation


Changeset 543:40141acabee7 in freeDiameter for freeDiameter/sctps.c


Ignore:
Timestamp:
Sep 14, 2010, 1:31:27 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fix behavior of TLS/SCTP when only one peer does not accept the remote certificate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/sctps.c

    r455 r543  
    598598}
    599599
    600 /* Receive messages from all stream pairs */
    601 int fd_sctps_startthreads(struct cnxctx * conn)
     600/* Receive messages from others ? all other stream pairs : the master pair */
     601int fd_sctps_startthreads(struct cnxctx * conn, int others)
    602602{
    603603        uint16_t i;
     
    606606        CHECK_PARAMS( conn && conn->cc_sctps_data.array );
    607607       
    608         for (i = 0; i < conn->cc_sctp_para.pairs; i++) {
    609                
    610                 /* Start the decipher thread */
    611                 CHECK_POSIX( pthread_create( &conn->cc_sctps_data.array[i].thr, NULL, decipher, &conn->cc_sctps_data.array[i] ) );
     608        if (others) {
     609                for (i = 1; i < conn->cc_sctp_para.pairs; i++) {
     610
     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] ) );
    612616        }
    613617        return 0;
Note: See TracChangeset for help on using the changeset viewer.