Changeset 543:40141acabee7 in freeDiameter for freeDiameter/sctps.c
- Timestamp:
- Sep 14, 2010, 1:31:27 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameter/sctps.c
r455 r543 598 598 } 599 599 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 */ 601 int fd_sctps_startthreads(struct cnxctx * conn, int others) 602 602 { 603 603 uint16_t i; … … 606 606 CHECK_PARAMS( conn && conn->cc_sctps_data.array ); 607 607 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] ) ); 612 616 } 613 617 return 0;
Note: See TracChangeset
for help on using the changeset viewer.