summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-05-10 16:00:57 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-05-10 16:47:52 +0100
commit0971ec06ad925235fd3c6dae90a4fbc852ee72e8 (patch)
tree4cee4fb098f5bdcb9b1447afdeec0827e1f84314 /src
parent41313d92e0f157dacfa758993e7fc76e291b0415 (diff)
shift queue name use up to top layer in spooldir hierachy
Diffstat (limited to 'src')
-rw-r--r--src/src/queue.c27
-rw-r--r--src/src/receive.c2
2 files changed, 15 insertions, 14 deletions
diff --git a/src/src/queue.c b/src/src/queue.c
index d8c276013..f53759c43 100644
--- a/src/src/queue.c
+++ b/src/src/queue.c
@@ -12,49 +12,50 @@
-/* The number of nodes to use for the bottom-up merge sort when a list of queue
-items is to be ordered. The code for this sort was contributed as a patch by
-Michael Haardt. */
-
-#define LOG2_MAXNODES 32
-
-
-
/* Routines with knowlege of spool layout */
static void
spool_pname_buf(uschar * buf, int len)
{
-snprintf(CS buf, len, "%s/input/%s", spool_directory, queue_name);
+snprintf(CS buf, len, "%s/%s/input", spool_directory, queue_name);
}
static uschar *
spool_dname(const uschar * purpose, uschar * subdir)
{
return string_sprintf("%s/%s/%s/%s",
- spool_directory, purpose, queue_name, subdir);
+ spool_directory, queue_name, purpose, subdir);
}
uschar *
spool_sname(const uschar * purpose, uschar * subdir)
{
return string_sprintf("%s%s%s%s%s",
+ queue_name, *queue_name ? "/" : "",
purpose,
- *queue_name ? "/" : "", queue_name,
- *message_subdir ? "/" : "", message_subdir);
+ *subdir ? "/" : "", subdir);
}
uschar *
spool_fname(const uschar * purpose, uschar * subdir, uschar * fname, uschar * suffix)
{
return string_sprintf("%s/%s/%s/%s/%s%s",
- spool_directory, purpose, queue_name, subdir, fname, suffix);
+ spool_directory, queue_name, purpose, subdir, fname, suffix);
}
#ifndef COMPILE_UTILITY
+
+/* The number of nodes to use for the bottom-up merge sort when a list of queue
+items is to be ordered. The code for this sort was contributed as a patch by
+Michael Haardt. */
+
+#define LOG2_MAXNODES 32
+
+
+
/*************************************************
* Helper sort function for queue_get_spool_list *
*************************************************/
diff --git a/src/src/receive.c b/src/src/receive.c
index a0d975897..8e4384ae1 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -2869,7 +2869,7 @@ if ((data_fd = Uopen(spool_name, O_RDWR|O_CREAT|O_EXCL, SPOOL_MODE)) < 0)
{
if (errno == ENOENT)
{
- (void)directory_make(spool_directory,
+ (void) directory_make(spool_directory,
spool_sname(US"input", message_subdir),
INPUT_DIRECTORY_MODE, TRUE);
data_fd = Uopen(spool_name, O_RDWR|O_CREAT|O_EXCL, SPOOL_MODE);