Skip to content

Commit e4d43d8

Browse files
committed
Merged in [8377] from rjsparks@nostrum.com:\n Removes a modify-while-iterating error, and removes a bug where two different bits of code thought they were responsible for deleting things from a global list. Fixes bug ietf-tools#1498.
- Legacy-Id: 8388 Note: SVN reference [8377] has been migrated to Git commit a12be8a
2 parents 90fa824 + a12be8a commit e4d43d8

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

static/js/agenda/agenda_listeners.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,23 +1009,20 @@ function update_from_slot(session_id, from_slot_id)
10091009
if(from_slot_id != null && from_scheduledslots != undefined){
10101010
//console.log("1 from_slot_id", from_slot_id, from_scheduledslots);
10111011
var count = from_scheduledslots.length;
1012-
var found = false;
1012+
var found = [];
10131013
for(var k = 0; k<from_scheduledslots.length; k++) {
10141014
var from_ss = from_scheduledslots[k];
10151015
if(from_ss.session_id == session_id){
1016-
found = true;
1017-
1018-
var promise = from_ss.deleteit();
1019-
delete_promises.push(promise);
1020-
from_scheduledslots.splice(k,1);
1021-
count--;
1016+
found.push(from_ss)
10221017
}
10231018
}
1024-
if(found && count == 0) {
1025-
from_timeslot.mark_empty();
1026-
} else {
1027-
console.log("not setting fromslot empty", from_timeslot, count, found, session_id, "from_slot_id", from_slot_id);
1019+
for (var k = 0; k<found.length; k++) {
1020+
// This will affect agenda_globals.slot_status[from_slot_id], hence from_scheduledslots
1021+
delete_promises.push(found[k].deleteit());
10281022
}
1023+
if (from_scheduledslots.length==0){
1024+
from_timeslot.mark_empty();
1025+
}
10291026

10301027
/* remove undefined entries */
10311028
new_fromslots = [];

0 commit comments

Comments
 (0)