Browse code

bb#1402

git-svn: trunk@4815

aCaB authored on 2009/02/18 04:48:09
Showing 2 changed files
... ...
@@ -8,6 +8,11 @@ Tue Feb 17 22:10:10 EET 2009 (edwin)
8 8
  unit_tests/check_clamd.c: git-* commands are gone, use 'git svn'.
9 9
  correct include position for fdpassing.h
10 10
 
11
+Tue Feb 17 21:09:23 CET 2009 (acab)
12
+-----------------------------------
13
+ * clamav-milter/clamav-milter.c: compile cleanly with 4+ year old
14
+	 libmilter still being shipped (bb#1402)
15
+  
11 16
 Tue Feb 17 20:35:21 EET 2009 (edwin)
12 17
 ------------------------------------
13 18
  * clamd/server-th.c, clamd/session.c, clamd/session.h,
... ...
@@ -43,24 +43,7 @@
43 43
 #include "clamfi.h"
44 44
 #include "whitelist.h"
45 45
 
46
-struct smfiDesc descr = {
47
-    "ClamAV", 		/* filter name */
48
-    SMFI_VERSION,	/* milter version */
49
-    SMFIF_CHGHDRS|SMFIF_QUARANTINE, /* flags */
50
-    clamfi_connect,	/* connection info filter */
51
-    NULL,		/* SMTP HELO command filter */
52
-    clamfi_envfrom,	/* envelope sender filter */
53
-    clamfi_envrcpt,	/* envelope recipient filter */
54
-    clamfi_header,	/* header filter */
55
-    NULL,		/* end of header */
56
-    clamfi_body,	/* body block */
57
-    clamfi_eom,		/* end of message */
58
-    clamfi_abort,	/* message aborted */
59
-    NULL,		/* connection cleanup */
60
-    NULL,		/* any unrecognized or unimplemented command filter */
61
-    NULL,		/* SMTP DATA command filter */
62
-    NULL		/* negotiation callback */
63
-};
46
+struct smfiDesc descr;
64 47
 
65 48
 int main(int argc, char **argv) {
66 49
     char *my_socket, *pt;
... ...
@@ -68,6 +51,18 @@ int main(int argc, char **argv) {
68 68
     struct optstruct *opts;
69 69
     int ret;
70 70
 
71
+    memset(&descr, 0, sizeof(struct smfiDesc));
72
+    descr.xxfi_name = "ClamAV";			/* filter name */
73
+    descr.xxfi_version = SMFI_VERSION;		/* milter version */
74
+    descr.xxfi_flags = SMFIF_CHGHDRS|SMFIF_QUARANTINE; /* flags */
75
+    descr.xxfi_connect = clamfi_connect;	/* connection info filter */
76
+    descr.xxfi_envfrom = clamfi_envfrom;	/* envelope sender filter */
77
+    descr.xxfi_envrcpt = clamfi_envrcpt;	/* envelope recipient filter */
78
+    descr.xxfi_header = clamfi_header;		/* header filter */
79
+    descr.xxfi_body = clamfi_body;		/* body block */
80
+    descr.xxfi_eom = clamfi_eom;		/* end of message */
81
+    descr.xxfi_abort = clamfi_abort;		/* message aborted */
82
+
71 83
     opts = optparse(NULL, argc, argv, 1, OPT_MILTER, 0, NULL);
72 84
     if (!opts) {
73 85
 	mprintf("!Can't parse command line options\n");