chiark
/
gitweb
/
~mdw
/
ezmlm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debianization and various other fixes.
[ezmlm]
/
qmail.c
diff --git
a/qmail.c
b/qmail.c
index 1ee257bd002865a32a8efc3f3970246b8e688f9b..5c204c0f6b8fc830c24d77e61daad9c63a5cf928 100644
(file)
--- a/
qmail.c
+++ b/
qmail.c
@@
-1,3
+1,4
@@
+#include <stdlib.h>
#include "substdio.h"
#include "readwrite.h"
#include "wait.h"
#include "substdio.h"
#include "readwrite.h"
#include "wait.h"
@@
-10,7
+11,15
@@
#include "stralloc.h"
#include "idx.h"
#include "stralloc.h"
#include "idx.h"
-static char *binqqargs[2] = { PROG_QMAIL_QUEUE, 0 } ;
+static char *binqqargs[2] = { 0, 0 } ;
+
+static void setup_qqargs()
+{
+ if(!binqqargs[0])
+ binqqargs[0] = getenv("QMAILQUEUE");
+ if(!binqqargs[0])
+ binqqargs[0] = "/usr/sbin/qmail-queue";
+}
int qmail_open(qq,sa)
struct qmail *qq;
int qmail_open(qq,sa)
struct qmail *qq;
@@
-21,6
+30,8
@@
stralloc *sa;
unsigned i,j;
char **cpp;
unsigned i,j;
char **cpp;
+ setup_qqargs();
+
qq->msgbytes = 0L;
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }
qq->msgbytes = 0L;
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }