summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/bounce.c
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2011-04-14 21:53:47 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2011-04-14 21:53:47 +0000
commit1dfda728514d3dfa5392aaba1e10de003909639e (patch)
tree1548848951e6ac789341b133c5c573d9617b792b /usr.sbin/smtpd/bounce.c
parent31f310c8229e9d38537aeee483beecd845fcd8c6 (diff)
fsqueue now provides fsqueue_message_fd_r() and fsqueue_message_fd_rw() to
obtain a read{-only,/write} descriptor to the message file. make sure smtpd uses the new API everywhere it needs a fd, and kill the many functions that were used until now.
Diffstat (limited to 'usr.sbin/smtpd/bounce.c')
-rw-r--r--usr.sbin/smtpd/bounce.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/bounce.c b/usr.sbin/smtpd/bounce.c
index 9bea66eb241..7889f10f36b 100644
--- a/usr.sbin/smtpd/bounce.c
+++ b/usr.sbin/smtpd/bounce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bounce.c,v 1.27 2011/04/14 20:11:08 gilles Exp $ */
+/* $OpenBSD: bounce.c,v 1.28 2011/04/14 21:53:45 gilles Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@openbsd.org>
@@ -55,7 +55,8 @@ bounce_session(struct smtpd *env, int fd, struct message *messagep)
FILE *msgfp = NULL;
/* get message content */
- if ((msgfd = queue_open_message_file(messagep->message_id)) == -1)
+ if ((msgfd = queue_message_fd_r(env, Q_QUEUE,
+ messagep->message_id)) == -1)
goto fail;
msgfp = fdopen(msgfd, "r");
if (msgfp == NULL)