aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-03-09 16:31:14 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2011-03-09 16:31:14 +0200
commit277634ec6dda1a7b7bf35954bfdda28d7df7fdcd (patch)
tree49f9c3e9662bb48ab2a9b69c54cb4b8a613befc9 /src
parent30dfac6b8bc411481c9dd333bd8baab9e15c2d00 (diff)
downloadmailfromd-277634ec6dda1a7b7bf35954bfdda28d7df7fdcd.tar.gz
mailfromd-277634ec6dda1a7b7bf35954bfdda28d7df7fdcd.tar.bz2
Cleanup.
* po/POTFILES.in: Remove appinit.c (See e473ab7d). * src/Makefile.am: Restore incdir, needed for AM_CPPFLAGS. Was accidentally removed in 01ad06fca. * src/builtin/sa.bi (sa): Restore initialization of msize. Accidentally removed in bcd64af9. * src/main.c: Call mf_server_log_setup after compiling the sources, so that --lint spits out its diagnostics on stderr (initially placed here in e75c9a39).
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/builtin/sa.bi6
-rw-r--r--src/main.c3
3 files changed, 10 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 7afa8030..e301eb10 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -101,12 +101,14 @@ BUILT_SOURCES=\
mfd-dbgmod.h\
node-tab.c\
node-type.h\
optab.c\
optab.h
+incdir=$(pkgdatadir)/$(VERSION)/include
+
AM_CPPFLAGS=-DSYSCONFDIR=\"$(sysconfdir)\"\
-DDEFAULT_STATE_DIR=\"$(DEFAULT_STATE_DIR)\"\
-DDEFAULT_SOCKET=\"$(DEFAULT_SOCKET)\"\
-DDEFAULT_VERSION_INCLUDE_DIR=\"$(incdir)\"\
-DDEFAULT_INCLUDE_DIR=\"$(pkgdatadir)/include\"\
-DDEFAULT_PREPROCESSOR="\"$(DEFAULT_PREPROCESSOR)\""\
diff --git a/src/builtin/sa.bi b/src/builtin/sa.bi
index bd2ef1fc..231ad00e 100644
--- a/src/builtin/sa.bi
+++ b/src/builtin/sa.bi
@@ -326,12 +326,18 @@ MF_DEFUN(sa, NUMBER, STRING urlstr, NUMBER prec, OPTIONAL, NUMBER report)
long version;
int result;
long score, threshold;
int report_mode = MF_OPTVAL(report);
int rc;
+ rc = mu_stream_size(mstr, &msize);
+ MF_ASSERT(rc == 0,
+ mfe_failure,
+ "mu_stream_size: %s",
+ mu_strerror (rc));
+
ostr = open_connection(env, urlstr, NULL);
msize += env_get_line_count(env);
mu_stream_printf(ostr,
report_mode ? "REPORT SPAMC/1.2\n"
: "SYMBOLS SPAMC/1.2\n");
diff --git a/src/main.c b/src/main.c
index 3d0264c9..b16a554f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1185,13 +1185,12 @@ main(int argc, char **argv)
rc = mu_app_init(&argp, capa, mf_cfg_param, argc, argv,
argpflag(argc, argv), &index, &args);
if (rc)
exit(EX_CONFIG);
flush_arguments(&args);
mf_srvcfg_flush();
- mf_server_log_setup();
alloc_ext_pp();
argv += index;
argc -= index;
@@ -1251,12 +1250,14 @@ main(int argc, char **argv)
if (script_check || script_dump_macros
|| script_dump_code || script_dump_tree || script_dump_xref
|| yy_flex_debug || script_ydebug)
exit(EX_OK);
+ mf_server_log_setup();
+
switch (mode) {
case MAILFROMD_DAEMON:
provide_default_milter_server();
provide_default_callout_server();
break;

Return to:

Send suggestions and report system problems to the System administrator.