-/* $Cambridge: exim/src/src/spam.c,v 1.6 2005/05/10 22:39:20 tom Exp $ */
+/* $Cambridge: exim/src/src/spam.c,v 1.8 2005/06/22 15:44:38 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
pollfd.fd = spamd_sock;
pollfd.events = POLLOUT;
#endif
- fcntl(spamd_sock, F_SETFL, O_NONBLOCK);
+ (void)fcntl(spamd_sock, F_SETFL, O_NONBLOCK);
do {
read = fread(spamd_buffer,1,sizeof(spamd_buffer),mbox_file);
if (read > 0) {
}
#endif
wrote = send(spamd_sock,spamd_buffer + offset,read - offset,0);
+ if (wrote == -1)
+ {
+ log_write(0, LOG_MAIN|LOG_PANIC,
+ "spam acl condition: %s on spamd socket", strerror(errno));
+ close(spamd_sock);
+ fclose(mbox_file);
+ return DEFER;
+ }
if (offset + wrote != read) {
offset += wrote;
goto again;