summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-08-25 15:47:48 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-08-25 15:47:48 +0000
commit707d9594b94b06c184f62a075da3413fa7079180 (patch)
treea123cbb0b6ebcce57248547a6b1b9cf8dfbc7a85 /usr.sbin
parent8ddc22ad5f09fb7765706101f2742307a51ff02a (diff)
It's ok to try to rollback an update we don't know about. It might
happen if the message is aborted before an envelope is sent to the scheduler. In this case, just ignore it. ok gilles@ chl@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/scheduler_ramqueue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/scheduler_ramqueue.c b/usr.sbin/smtpd/scheduler_ramqueue.c
index 5ff5312c40f..69b87710a82 100644
--- a/usr.sbin/smtpd/scheduler_ramqueue.c
+++ b/usr.sbin/smtpd/scheduler_ramqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scheduler_ramqueue.c,v 1.19 2012/08/25 10:23:12 gilles Exp $ */
+/* $OpenBSD: scheduler_ramqueue.c,v 1.20 2012/08/25 15:47:47 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@openbsd.org>
@@ -206,7 +206,8 @@ scheduler_ramqueue_rollback(uint32_t msgid)
struct rq_queue *update;
struct rq_envelope *envelope;
- update = tree_xpop(&updates, msgid);
+ if ((update = tree_pop(&updates, msgid)) == NULL)
+ return;
while ((envelope = TAILQ_FIRST(&update->bounce)))
rq_envelope_delete(update, envelope);