- Timestamp:
- Dec 9, 2007 12:21:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r1623 r1624 1015 1015 for (i=0; i<conf->max_ports; ++i) { 1016 1016 unsigned j; 1017 1018 conf_port = conf->ports[i]; 1019 1020 if (!conf_port) 1017 struct conf_port *src_port; 1018 1019 src_port = conf->ports[i]; 1020 1021 if (!src_port) 1021 1022 continue; 1022 1023 1023 if ( conf_port->listener_cnt == 0)1024 if (src_port->listener_cnt == 0) 1024 1025 continue; 1025 1026 1026 for (j=0; j<conf_port->listener_cnt; ++j) { 1027 if (conf_port->listener_slots[j] == port) { 1028 pj_array_erase(conf_port->listener_slots, sizeof(SLOT_TYPE), 1029 conf_port->listener_cnt, j); 1027 for (j=0; j<src_port->listener_cnt; ++j) { 1028 if (src_port->listener_slots[j] == port) { 1029 pj_array_erase(src_port->listener_slots, sizeof(SLOT_TYPE), 1030 src_port->listener_cnt, j); 1031 pj_assert(conf->connect_cnt > 0); 1030 1032 --conf->connect_cnt; 1031 -- conf_port->listener_cnt;1033 --src_port->listener_cnt; 1032 1034 break; 1033 1035 } … … 1035 1037 } 1036 1038 1037 /* Update conf's connection count. */ 1038 conf_port = conf->ports[port]; 1039 conf->connect_cnt -= conf_port->listener_cnt; 1039 /* Update transmitter_cnt of ports we're transmitting to */ 1040 while (conf_port->listener_cnt) { 1041 unsigned dst_slot; 1042 struct conf_port *dst_port; 1043 1044 dst_slot = conf_port->listener_slots[conf_port->listener_cnt-1]; 1045 dst_port = conf->ports[dst_slot]; 1046 --dst_port->transmitter_cnt; 1047 --conf_port->listener_cnt; 1048 pj_assert(conf->connect_cnt > 0); 1049 --conf->connect_cnt; 1050 } 1040 1051 1041 1052 /* Remove the port. */
Note: See TracChangeset
for help on using the changeset viewer.