]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Use bug subscription domain in bug_list_forward
authorDon Armstrong <don@donarmstrong.com>
Sun, 26 Oct 2008 19:54:24 +0000 (12:54 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 26 Oct 2008 19:54:24 +0000 (12:54 -0700)
scripts/process

index 9c5d38a861d1d6ba7bf8b2ea6edb825b82d1ac2d..aa001b11d2ba66138301fd4eabe6793b74015471 100755 (executable)
@@ -1128,9 +1128,18 @@ sub bug_list_forward{
      my ($bug_fn) = @_;
      # Read the bug information and package information for passing to
      # the mailing list
+     my $bug_fh = IO::File->new("incoming/P$bug_fn",'r') or
+         die "Unable to open incoming/P$bug_fn $!";
+
+     if (not defined $config{bug_subscription_domain} or not
+        length $config{bug_subscription_domain}) {
+         unlink("incoming/P$bug_fn") or
+              die "unlinking incoming/P$bug_fn: $!";
+         exit 0;
+     }
+
      my ($bug_number) = $bug_fn =~ /^L(\d+)\./;
-     my ($bfound, $data)= lockreadbugmerge($bug_number);
-     my $bug_fh = IO::File->new("incoming/P$bug_fn",'r') or die "Unable to open incoming/P$bug_fn $!";
+     my $data = read_bug(bug => $bug_number);
 
      local $/ = undef;
      my $bug_message = <$bug_fh>;
@@ -1155,10 +1164,10 @@ sub bug_list_forward{
      # If we don't have a bug address, something has gone horribly wrong.
      print STDERR "Doesn't match: $bug_address\n" and exit 1 unless defined $bug_address;
      $bug_address =~ s/\@.+//;
-     print DEBUG "Sending message to bugs=$bug_address\@$gListDomain\n";
+     print DEBUG "Sending message to bugs=$bug_address\@$config{bug_subscription_domain}\n";
      print DEBUG $header.qq(\n\n).$body;
      send_mail_message(message        => $header.qq(\n\n).$body,
-                      recipients     => ["bugs=$bug_address\@$gListDomain"],
+                      recipients     => ["bugs=$bug_address\@$config{bug_subscription_domain}"],
                       envelope_from  => $envelope_from,
                       encode_headers => 0,
                      );