Browse code

More cleanup

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@2447 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2006/10/29 04:47:52
Showing 1 changed files
... ...
@@ -20,10 +20,11 @@
20 20
  *  MA 02110-1301, USA.
21 21
  *
22 22
  * Install into /usr/local/sbin/clamav-milter
23
+ * See http://www.elandsys.com/resources/sendmail/libmilter/overview.html
23 24
  *
24 25
  * For installation instructions see the file INSTALL that came with this file
25 26
  */
26
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.293 2006/10/28 16:12:49 njh Exp $";
27
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.294 2006/10/28 19:47:52 njh Exp $";
27 28
 
28 29
 #define	CM_VERSION	"devel-281006"
29 30
 
... ...
@@ -2340,6 +2341,12 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr)
2340 2340
 			syslog(LOG_ERR, _("clamfi_connect: hostname is null"));
2341 2341
 		return cl_error;
2342 2342
 	}
2343
+	if(smfi_getpriv(ctx) != NULL) {
2344
+		/* More than one connection command, "can't happen" */
2345
+		cli_warnmsg("clamfi_connect: called more than once\n");
2346
+		clamfi_cleanup(ctx);
2347
+		return cl_error;
2348
+	}
2343 2349
 	if((hostaddr == NULL) || (&(((struct sockaddr_in *)(hostaddr))->sin_addr) == NULL))
2344 2350
 		/*
2345 2351
 		 * According to the sendmail API hostaddr is NULL if
... ...
@@ -2508,12 +2515,6 @@ clamfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr)
2508 2508
 
2509 2509
 		return SMFIS_REJECT;
2510 2510
 	}
2511
-	if(smfi_getpriv(ctx) != NULL) {
2512
-		/* More than one connection command, "can't happen" */
2513
-		cli_warnmsg("clamfi_connect: called more than once\n");
2514
-		clamfi_cleanup(ctx);
2515
-		return cl_error;
2516
-	}
2517 2511
 
2518 2512
 	if(blacklist_time == 0)
2519 2513
 		return SMFIS_CONTINUE;	/* allocate privdata per message */