Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. [PATCH 4/4] delayer: Handle drained queue properly
(Christoph Biedl)
----------------------------------------------------------------------
Message: 1
Date: Mon, 15 Jan 2024 18:00:00 +0100
From: Christoph Biedl <[email protected]>
To: [email protected]
Subject: [PATCH 4/4] delayer: Handle drained queue properly
Message-ID: <[email protected]>
If the queue runs empty, there are several warnings about uninitialized
values. Rewrite the queue handling to avoid duplicate checks.
---
contrib/delayer.in | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/contrib/delayer.in b/contrib/delayer.in
index 8b66c3b48..d52622420 100644
--- a/contrib/delayer.in
+++ b/contrib/delayer.in
@@ -81,18 +81,16 @@ while (1) {
push(@queue, "$exp:$line");
}
- if ($#queue < 0) {
- undef $timeout;
- next;
- }
-
- my ($first, $line) = split(/:/, $queue[0], 2);
- while ($#queue >= 0 && $first <= $now) {
+ undef $timeout;
+ while (@queue) {
+ my ($first, $line) = split(/:/, $queue[0], 2);
+ if ($first > $now) {
+ $timeout = $first - $now;
+ last;
+ }
print OUT $line;
shift(@queue);
- ($first, $line) = split(/:/, $queue[0], 2);
}
- $timeout = $first - $now;
}
__END__
--
2.39.2
------------------------------
Subject: Digest Footer
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
------------------------------
End of inn-workers Digest, Vol 157, Issue 8
*******************************************