From: Peter Pentchev Date: Mon, 3 Aug 2009 13:43:28 +0000 (+0000) Subject: Remove the last vestiges of deconstifying, no longer needed. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce6a4153dc789747daa0984c404a3c80dc0fbdec;p=people%2Fms%2Fdma.git Remove the last vestiges of deconstifying, no longer needed. --- diff --git a/patches/15-bounce-message.patch b/patches/15-bounce-message.patch deleted file mode 100644 index 178b0fd..0000000 --- a/patches/15-bounce-message.patch +++ /dev/null @@ -1,84 +0,0 @@ -Make the bounce error message buffer dynamic. The rest of this comment -is left over from when this read "Provide the proper bounce error message". - -This may not be the best solution - the error message buffer has now -turned dynamic, but the only alternative I see is to make it a static -array in net.c... and I'm not quite sure if I want to do that just now. - ---- a/dma.c -+++ b/dma.c -@@ -590,7 +590,7 @@ - } - - static void --bounce(struct qitem *it, const char *reason) -+bounce(struct qitem *it, char *reason) - { - struct queue bounceq; - struct qitem *bit; -@@ -751,6 +751,7 @@ - config->features & FULLBOUNCE ? - "Original message follows." : - "Message headers follow."); -+ free(reason); - if (error < 0) - goto fail; - if (fflush(bit->queuef) != 0) -@@ -834,7 +835,7 @@ - #endif - - static int --deliver_local(struct qitem *it, const char **errmsg) -+deliver_local(struct qitem *it, char **errmsg) - { - char fn[PATH_MAX+1]; - char line[1000]; -@@ -917,7 +918,7 @@ - #ifdef HAVE_LIBLOCKFILE - mailunlock(); - #endif -- *errmsg = "corrupted queue file"; -+ *errmsg = strdup("corrupted queue file"); - error = -1; - goto chop; - } -@@ -960,7 +961,7 @@ - { - int error; - unsigned int backoff = MIN_RETRY; -- const char *errmsg = "unknown bounce reason"; -+ char *errmsg = strdup("unknown bounce reason"); - struct timeval now; - struct stat st; - ---- a/dma.h -+++ b/dma.h -@@ -165,7 +165,7 @@ - extern char *ssl_errstr(void); - extern int read_remote(int, int, char *); - extern ssize_t send_remote_command(int, const char*, ...); --extern int deliver_remote(struct qitem *, const char **); -+extern int deliver_remote(struct qitem *, char **); - - /* base64.c */ - extern int base64_encode(const void *, int, char **); ---- a/net.c -+++ b/net.c -@@ -347,7 +347,7 @@ - } - - int --deliver_remote(struct qitem *it, const char **errmsg) -+deliver_remote(struct qitem *it, char **errmsg) - { - struct authuser *a; - char *host, line[1000]; -@@ -474,7 +474,7 @@ - if (linelen == 0 || line[linelen - 1] != '\n') { - syslog(LOG_CRIT, "%s: remote delivery failed:" - "corrupted queue file", it->queueid); -- *errmsg = "corrupted queue file"; -+ *errmsg = strdup("corrupted queue file"); - error = -1; - goto out; - } diff --git a/patches/series b/patches/series index b487785..cf72ea2 100644 --- a/patches/series +++ b/patches/series @@ -5,7 +5,6 @@ 09-typos.patch 10-liblockfile.patch 11-double-bounce.patch -15-bounce-message.patch 17-mailname.patch 20-parse-recipient.patch 22-openfiles.patch