git-svn: trunk@4521
aCaB authored on 2008/12/05 01:26:19... | ... |
@@ -49,7 +49,7 @@ struct CLAMFI { |
49 | 49 |
|
50 | 50 |
|
51 | 51 |
static sfsistat sendchunk(struct CLAMFI *cf, unsigned char *bodyp, size_t len, SMFICTX *ctx) { |
52 |
- if(cf->totsz > maxfilesize) |
|
52 |
+ if(cf->totsz >= maxfilesize) |
|
53 | 53 |
return SMFIS_CONTINUE; /* FIXME: SMFIS_SKIP needs negotiation (only for _body() */ |
54 | 54 |
|
55 | 55 |
if(cf->totsz + len > maxfilesize) |
... | ... |
@@ -111,7 +111,7 @@ sfsistat clamfi_header(SMFICTX *ctx, char *headerf, char *headerv) { |
111 | 111 |
return SMFIS_TEMPFAIL; |
112 | 112 |
} |
113 | 113 |
cf->totsz = 0; |
114 |
- cf->totsz = 0; |
|
114 |
+ cf->bufsz = 0; |
|
115 | 115 |
if(nc_connect_rand(&cf->main, &cf->alt, &cf->local)) { |
116 | 116 |
logg("!Failed to initiate streaming/fdpassing\n"); |
117 | 117 |
free(cf); |
... | ... |
@@ -193,7 +193,6 @@ sfsistat clamfi_eom(SMFICTX *ctx) { |
193 | 193 |
free(cf); |
194 | 194 |
|
195 | 195 |
len = strlen(reply); |
196 |
- logg("^reply: %s\n", reply); |
|
197 | 196 |
if(len>5 && !strcmp(reply + len - 5, ": OK\n")) |
198 | 197 |
ret = SMFIS_ACCEPT; |
199 | 198 |
else if (len>7 && !strcmp(reply + len - 7, " FOUND\n")) |