From ed225ca75114eb44cbea0672ff4a8156bde48966 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sun, 11 Sep 2011 21:59:08 +0000 Subject: [PATCH] fix split events, check for duplicates git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@385 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/lib/rsv.class | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/mongoose/lib/rsv.class b/var/mongoose/lib/rsv.class index 241c748..2d0d49b 100755 --- a/var/mongoose/lib/rsv.class +++ b/var/mongoose/lib/rsv.class @@ -140,6 +140,18 @@ rsv method fix_hsvc {} { rsv method insert {{table pending}} { global rsvdb + # Duplicate check - all tables + foreach tab {pending TBL_RESERVATION} { + set rec [$rsvdb query " + select ulslot from $tab + where szCRID = '%s' + " $szCRID] + if {[llength $rec] > 0} { + throw 20 "Duplicate reservation." + return + } + } + # Find a spare slot. if {$ulslot < 0} { set slotlist [$rsvdb query " @@ -321,6 +333,8 @@ proc {rsv construct} {event type} { if {[string match {*#?} $args(szCRID)]} { set args(ucRecKind) 2 set args(szCRID) [string range $args(szCRID) 0 end-2] + # TOTO - check to see how many parts there are... + append args(szEventToRecord) $args(szEventToRecord) } } else { # Series