summaryrefslogtreecommitdiff
path: root/src/src/functions.h
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-10-24 23:34:19 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2019-10-25 00:55:45 +0100
commitfc7bae7f2fa3668ada9bd173e9f24c7166e1dd13 (patch)
tree8efa3fd97a1cfc91694497fbca1cd44b25c810d3 /src/src/functions.h
parent444163417b289354b53d4708760f31d947ac6fd1 (diff)
Support moving messages across named queues. Bug 2456
Diffstat (limited to 'src/src/functions.h')
-rw-r--r--src/src/functions.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/src/functions.h b/src/src/functions.h
index 8905d02a2..3b3a12b18 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -878,20 +878,33 @@ return string_sprintf("%s/%s/%s/%s",
# endif
static inline uschar *
-spool_sname(const uschar * purpose, uschar * subdir)
+spool_q_sname(const uschar * purpose, const uschar * q, uschar * subdir)
{
return string_sprintf("%s%s%s%s%s",
- queue_name, *queue_name ? "/" : "",
+ q, *q ? "/" : "",
purpose,
*subdir ? "/" : "", subdir);
}
static inline uschar *
+spool_sname(const uschar * purpose, uschar * subdir)
+{
+return spool_q_sname(purpose, queue_name, subdir);
+}
+
+static inline uschar *
+spool_q_fname(const uschar * purpose, const uschar * q,
+ const uschar * subdir, const uschar * fname, const uschar * suffix)
+{
+return string_sprintf("%s/%s/%s/%s/%s%s",
+ spool_directory, q, purpose, subdir, fname, suffix);
+}
+
+static inline uschar *
spool_fname(const uschar * purpose, const uschar * subdir, const uschar * fname,
const uschar * suffix)
{
-return string_sprintf("%s/%s/%s/%s/%s%s",
- spool_directory, queue_name, purpose, subdir, fname, suffix);
+return spool_q_fname(purpose, queue_name, subdir, fname, suffix);
}
static inline void