fix transaction
git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2811 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
parent
e6ed9e9822
commit
76308b9489
@ -1,7 +1,7 @@
|
|||||||
Package: webif
|
Package: webif
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: web
|
Section: web
|
||||||
Version: 1.2.8-11
|
Version: 1.2.8-12
|
||||||
Architecture: mipsel
|
Architecture: mipsel
|
||||||
Maintainer: af123@hummypkg.org.uk
|
Maintainer: af123@hummypkg.org.uk
|
||||||
Depends: tcpfix,webif-channelicons(>=1.1.20),lighttpd(>=1.4.39-1),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.1),hmt(>=2.0.9),ssmtp,cron-daemon(>=1.18.3-2),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7)
|
Depends: tcpfix,webif-channelicons(>=1.1.20),lighttpd(>=1.4.39-1),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.1),hmt(>=2.0.9),ssmtp,cron-daemon(>=1.18.3-2),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7)
|
||||||
|
@ -329,10 +329,8 @@ rsv method insert {{table pending} {force 0}} {
|
|||||||
#puts $query
|
#puts $query
|
||||||
#puts $bvals
|
#puts $bvals
|
||||||
|
|
||||||
$rsvdb query "begin transaction;"
|
|
||||||
$rsvdb query "delete from ${table} where ulslot = $ulslot;"
|
$rsvdb query "delete from ${table} where ulslot = $ulslot;"
|
||||||
$rsvdb query $query {*}$bvals
|
$rsvdb query $query {*}$bvals
|
||||||
$rsvdb query "commit transaction;"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc {rsv list} {{table tbl_reservation} {extra ""}} {
|
proc {rsv list} {{table tbl_reservation} {extra ""}} {
|
||||||
@ -435,8 +433,8 @@ proc {rsv entry} {{table TBL_RESERVATION} crid svc} {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
proc {rsv fetch} {{table TBL_RESERVATION} ersvtype hsvc nsttime usevtid events} {
|
proc {rsv fetch} {table ersvtype hsvc nsttime usevtid {crid ""} {extra ""}} {
|
||||||
set res [$::rsvdb query "
|
set q "
|
||||||
select $table.*,
|
select $table.*,
|
||||||
channel.TBL_SVC.szSvcName, channel.TBL_SVC.usLcn
|
channel.TBL_SVC.szSvcName, channel.TBL_SVC.usLcn
|
||||||
from $table
|
from $table
|
||||||
@ -444,9 +442,23 @@ proc {rsv fetch} {{table TBL_RESERVATION} ersvtype hsvc nsttime usevtid events}
|
|||||||
on $table.hSvc = channel.TBL_SVC.hSvc
|
on $table.hSvc = channel.TBL_SVC.hSvc
|
||||||
where $table.ersvtype = '%s'
|
where $table.ersvtype = '%s'
|
||||||
and $table.hsvc = '%s'
|
and $table.hsvc = '%s'
|
||||||
and $table.nsttime = '%s'
|
|
||||||
and $table.usevtid = '%s'
|
and $table.usevtid = '%s'
|
||||||
" $ersvtype $hsvc $nsttime $usevtid]
|
"
|
||||||
|
set params "$ersvtype $hsvc $usevtid"
|
||||||
|
|
||||||
|
if {$nsttime > 0} {
|
||||||
|
append q " and $table.nsttime = '%s' "
|
||||||
|
lappend params $nsttime
|
||||||
|
}
|
||||||
|
if {$crid ne ""} {
|
||||||
|
append q " and szCRID = '%s' "
|
||||||
|
lappend params $crid
|
||||||
|
}
|
||||||
|
if {$extra ne ""} {
|
||||||
|
append q " $extra "
|
||||||
|
}
|
||||||
|
|
||||||
|
set res [$::rsvdb query $q {*}$params]
|
||||||
|
|
||||||
if {[llength $res] > 0} {
|
if {[llength $res] > 0} {
|
||||||
return [rsv new [lindex $res 0]]
|
return [rsv new [lindex $res 0]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user