diff --git a/webif/lib/rsv.class b/webif/lib/rsv.class index c8a9d9d..03fda53 100644 --- a/webif/lib/rsv.class +++ b/webif/lib/rsv.class @@ -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 "
\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.
\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 "
\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 "
\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