-/* $Cambridge: exim/src/src/transports/autoreply.c,v 1.11 2009/11/16 19:50:39 nm4 Exp $ */
-
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
uschar *ptr = log_buffer;
sprintf(CS ptr, "%s\n previously sent to %.200s\n", tod_stamp(tod_log), to);
while(*ptr) ptr++;
- (void)write(log_fd, log_buffer, ptr - log_buffer);
- (void)close(log_fd);
+ if(write(log_fd, log_buffer, ptr - log_buffer) != ptr-log_buffer
+ || close(log_fd))
+ DEBUG(D_transport) debug_printf("Problem writing log file %s for %s "
+ "transport\n", logfile, tblock->name);
}
goto END_OFF;
}
}
memcpy(cache_time, &now, sizeof(time_t));
- (void)write(cache_fd, from, size);
+ if(write(cache_fd, from, size) != size)
+ DEBUG(D_transport) debug_printf("Problem writing cache file %s for %s "
+ "transport\n", oncelog, tblock->name);
}
/* Update DBM file */
" %s\n", headers);
while(*ptr) ptr++;
}
- (void)write(log_fd, log_buffer, ptr - log_buffer);
- (void)close(log_fd);
+ if(write(log_fd, log_buffer, ptr - log_buffer) != ptr-log_buffer
+ || close(log_fd))
+ DEBUG(D_transport) debug_printf("Problem writing log file %s for %s "
+ "transport\n", logfile, tblock->name);
}
else DEBUG(D_transport) debug_printf("Failed to open log file %s for %s "
"transport: %s\n", logfile, tblock->name, strerror(errno));