summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src/queue.c
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2006-08-17 05:10:43 +0000
committergshapiro <gshapiro@FreeBSD.org>2006-08-17 05:10:43 +0000
commit0a9c74f73599b0ca2981b57815b436d1f6de6191 (patch)
tree5f8206fabf17de836a5a6161ba1e0d5ff61638e4 /contrib/sendmail/src/queue.c
parent1024e3943e17bd4407f0cf3a799cfa05d59f1059 (diff)
downloadFreeBSD-src-0a9c74f73599b0ca2981b57815b436d1f6de6191.zip
FreeBSD-src-0a9c74f73599b0ca2981b57815b436d1f6de6191.tar.gz
Import sendmail 8.13.8
Diffstat (limited to 'contrib/sendmail/src/queue.c')
-rw-r--r--contrib/sendmail/src/queue.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c
index 151cd48..6fd2315 100644
--- a/contrib/sendmail/src/queue.c
+++ b/contrib/sendmail/src/queue.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/sem.h>
-SM_RCSID("@(#)$Id: queue.c,v 8.954 2006/04/22 01:07:00 ca Exp $")
+SM_RCSID("@(#)$Id: queue.c,v 8.954.2.5 2006/07/31 21:44:18 ca Exp $")
#include <dirent.h>
@@ -2646,6 +2646,7 @@ gatherq(qgrp, qdir, doall, full, more)
/* avoid work if possible */
if ((QueueSortOrder == QSO_BYFILENAME ||
QueueSortOrder == QSO_BYMODTIME ||
+ QueueSortOrder == QSO_NONE ||
QueueSortOrder == QSO_RANDOM) &&
QueueLimitQuarantine == NULL &&
QueueLimitSender == NULL &&
@@ -6312,7 +6313,19 @@ filesys_find(name, path, add)
for (i = 0; i < NumFileSys; ++i)
{
if (FILE_SYS_DEV(i) == st.st_dev)
+ {
+ /*
+ ** Make sure the file system (FS) name is set:
+ ** even though the source code indicates that
+ ** FILE_SYS_DEV() is only set below, it could be
+ ** set via shared memory, hence we need to perform
+ ** this check/assignment here.
+ */
+
+ if (NULL == FILE_SYS_NAME(i))
+ FILE_SYS_NAME(i) = name;
return i;
+ }
}
if (i >= MAXFILESYS)
{
@@ -6406,8 +6419,7 @@ filesys_update()
static time_t nextupdate = 0;
#if SM_CONF_SHM
- /* only the daemon updates this structure */
- if (ShmId == SM_SHM_NO_ID || DaemonPid != CurrentPid)
+ if (ShmId != SM_SHM_NO_ID && DaemonPid != CurrentPid)
return;
#endif /* SM_CONF_SHM */
now = curtime();
OpenPOWER on IntegriCloud