forked from hummypkg/webif
Change slotid of dummy entry to -1 in checkconfilcts to prevent confusion with real recording slot 0
This commit is contained in:
parent
c5358a9299
commit
67b3f61303
@ -1525,8 +1525,8 @@ proc {rsv evaluate_conflicts} {events type thresh {debug 0}} {
|
||||
lassign $ev start end hsvc eid sid
|
||||
|
||||
if {$debug} {
|
||||
puts "\nSLOTS: $slots"
|
||||
puts $ev
|
||||
puts "<br>\nSLOTS: $slots"
|
||||
puts "$ev - "
|
||||
}
|
||||
|
||||
# Close off any open slots that have now finished.
|
||||
@ -1588,7 +1588,7 @@ proc {rsv evaluate_conflicts} {events type thresh {debug 0}} {
|
||||
|
||||
lassign [lindex $slots 0] xsid xend
|
||||
if {$xend >= $end} continue
|
||||
if {$debug} { puts " Replacing slot 0.\n" }
|
||||
if {$debug} { puts " Replacing slot 0.<br>\n" }
|
||||
set uslot 0
|
||||
}
|
||||
|
||||
@ -1604,23 +1604,27 @@ proc {rsv evaluate_conflicts} {events type thresh {debug 0}} {
|
||||
proc {rsv newconflicts} {{thresh 1} {type "list"} {debug 0}} {
|
||||
set events [lsort -index 0 -integer [rsv allevents]]
|
||||
set conflicts [rsv evaluate_conflicts $events $type $thresh $debug]
|
||||
|
||||
if {$debug} {
|
||||
puts "<br>\nConflicts: $conflicts"
|
||||
}
|
||||
if {$type eq "map"} { return $conflicts }
|
||||
return [dict keys $conflicts]
|
||||
}
|
||||
|
||||
proc {rsv checkconflict} {s d thresh {debug 0}} {
|
||||
set events [rsv allevents]
|
||||
lappend events [list $s $($s + $d) 0 0 0]
|
||||
lappend events [list $s $($s + $d) 0 0 -1]
|
||||
set events [lsort -index 0 -integer $events]
|
||||
set conflicts [rsv evaluate_conflicts $events 'list' $thresh $debug]
|
||||
|
||||
if {$debug} {
|
||||
puts "<br>\nConflicts: $conflicts"
|
||||
}
|
||||
set ret {}
|
||||
|
||||
if {![dict exists $conflicts "0"]} { return $ret }
|
||||
if {![dict exists $conflicts "-1"]} { return $ret }
|
||||
|
||||
foreach c [dict get $conflicts 0] {
|
||||
if {$c eq "0"} continue
|
||||
foreach c [dict get $conflicts -1] {
|
||||
if {$c eq "-1"} continue
|
||||
set s [rsv slot $c]
|
||||
set s [$s name]
|
||||
lappend ret $s
|
||||
|
Loading…
Reference in New Issue
Block a user