Subversion Repositories sa-exim

Compare Revisions

Ignore whitespace Rev 89 → Rev 90

/trunk/debian/patches/api-limitations.patch
5,9 → 5,9
Bug-Debian: http://bugs.debian.org/420555
Bug-Debian: http://bugs.debian.org/420736
 
--- sa-exim-4.2.1.orig/sa-exim.c
+++ sa-exim-4.2.1/sa-exim.c
@@ -29,10 +29,8 @@ http://lists.merlins.org/lists/listinfo/
--- a/sa-exim.c
+++ b/sa-exim.c
@@ -29,10 +29,7 @@ http://lists.merlins.org/lists/listinfo/
#include "sa-exim.h"
/* Exim includes */
16,50 → 16,29
-extern int body_linecount; /* Line count in body */
-extern uschar *primary_hostname;
+#include <local_scan.h>
+//extern int body_linecount; /* Line count in body */
#ifdef DLOPEN_LOCAL_SCAN
@@ -602,6 +602,15 @@ int local_scan(volatile int fd, uschar *
@@ -602,6 +599,10 @@ int local_scan(volatile int fd, uschar *
/* Do not put a %s in there, or you'll segfault */
static char *SAmsgerror="Temporary local error while processing message, please contact postmaster";
+ /* This needs to be retrieved through expand_string in order
+ not to violate the API. */
+ static uschar *primary_hostname;
+ if (!primary_hostname) {
+ store_pool = POOL_PERM;
+ primary_hostname = expand_string("$primary_hostname");
+ store_pool = POOL_MAIN;
+ }
+ uschar *primary_hostname=expand_string("$primary_hostname");
+
/* New values we read from spamassassin */
char *xspamstatus=NULL;
char *xspamflag=NULL;
@@ -1229,18 +1268,19 @@ restart:
}
}
- if (SAEximDebug > 1)
+/* if (SAEximDebug > 1)
@@ -1241,6 +1242,7 @@ restart:
{
log_write(0, LOG_MAIN, "SA: Debug2: body_linecount before SA: %d", body_linecount);
}
-
+*/
/* update global variable $body_linecount to reflect the new body size*/
- body_linecount = (line - 1);
+/* body_linecount = (line - 1);
if (SAEximDebug > 1)
{
log_write(0, LOG_MAIN, "SA: Debug2: body_linecount after SA: %d", body_linecount);
}
+*/
+
}
fclose((FILE *)readfh);
@@ -1331,6 +1371,9 @@ restart:
@@ -1331,6 +1333,9 @@ restart:
if (dorej && doteergrube)
{
69,7 → 48,7
/* By default, we'll only save temp bounces by message ID so
* that when the same message is submitted several times, we
* overwrite the same file on disk and not create a brand new
@@ -1353,20 +1396,8 @@ restart:
@@ -1353,20 +1358,8 @@ restart:
for (i=0;i<SAteergrubetime/10;i++)
{