projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e328ac5
)
protect against a race
author
jeff
<jeff>
Mon, 28 Aug 2006 00:52:44 +0000
(
00:52
+0000)
committer
jeff
<jeff>
Mon, 28 Aug 2006 00:52:44 +0000
(
00:52
+0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
1801b12
..
e1281e3
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-1327,6
+1327,9
@@
sub batch_card {
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
+ $dbh->do("LOCK TABLE pay_batch IN SHARE ROW EXCLUSIVE MODE")
+ or return "Cannot lock pay_batch: " . $dbh->errstr;
+
my $pay_batch = qsearchs('pay_batch', {'status' => 'O'});
unless ( $pay_batch ) {