projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a few filesets
[clearscm.git]
/
maps
/
bin
/
MAPSDeliver
diff --git
a/maps/bin/MAPSDeliver
b/maps/bin/MAPSDeliver
index
05ceafd
..
ab6a2ff
100755
(executable)
--- a/
maps/bin/MAPSDeliver
+++ b/
maps/bin/MAPSDeliver
@@
-20,13
+20,13
@@
use warnings;
use FindBin;
use FindBin;
-use lib
$FindBin::Bin
;
+use lib
"$FindBin::Bin/../lib"
;
use MAPSFile;
use MAPSFile;
-use MAPS
DB
;
+use MAPS;
use MAPSLog;
use MAPSLog;
-sub DeliverMail
($$) {
+sub DeliverMail($$) {
my ($userid, $msgfileName) = @_;
# Open maildrop file
my ($userid, $msgfileName) = @_;
# Open maildrop file
@@
-42,8
+42,7
@@
sub DeliverMail ($$) {
# Write msgfile -> $maildrop
print $maildrop "\n\n";
# Write msgfile -> $maildrop
print $maildrop "\n\n";
- print $maildrop $_
- while (<$msgfile>);
+ print $maildrop $_ while (<$msgfile>);
# Unlock the file
Unlock $maildrop;
# Unlock the file
Unlock $maildrop;
@@
-61,14
+60,16
@@
my ($userid, $msgfile) = @ARGV;
die 'User id not specified' unless $userid;
die 'Msgfile not specified' unless $msgfile;
die 'User id not specified' unless $userid;
die 'Msgfile not specified' unless $msgfile;
-my $err
= DeliverMail $userid, $msgfile
;
+my $err
= DeliverMail($userid, $msgfile)
;
if ($err) {
if ($err) {
- OpenDB
'mapsadmin', 'mapsadmin'
;
+ OpenDB
('maps', 'spam')
;
-
MAPSDB::SetContext $userid
;
+
SetContext($userid)
;
- Error $err;
+ Error($err);
+
+ exit 1;
} # if
} # if
-exit
$err ? 1 :
0;
+exit 0;