masqmail-0.2

diff src/local.c @ 15:f671821d8222

code beautifying; 0 -> \0 if appropriate
author meillo@marmaro.de
date Thu, 06 Nov 2008 09:18:38 +0100
parents 26e34ae9a3e3
children a80ebfa16cd5
line diff
     1.1 --- a/src/local.c	Wed Oct 29 21:21:26 2008 +0100
     1.2 +++ b/src/local.c	Thu Nov 06 09:18:38 2008 +0100
     1.3 @@ -16,9 +16,10 @@
     1.4      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     1.5  */
     1.6  
     1.7 +#include <sys/wait.h>
     1.8 +
     1.9  #include "masqmail.h"
    1.10  #include "peopen.h"
    1.11 -#include <sys/wait.h>
    1.12  
    1.13  static void
    1.14  message_stream(FILE * out, message * msg, GList * hdr_list, guint flags)
    1.15 @@ -92,9 +93,7 @@
    1.16  				if (fcntl(fileno(out), F_SETLK, &lock) != -1) {
    1.17  #endif
    1.18  					fchmod(fileno(out), 0600);
    1.19 -
    1.20  					message_stream(out, msg, hdr_list, MSGSTR_FROMLINE | MSGSTR_FROMHACK);
    1.21 -
    1.22  					ok = TRUE;
    1.23  
    1.24  					/* close when still user */
    1.25 @@ -211,10 +210,9 @@
    1.26  					if (i == 3) {
    1.27  						FILE *out;
    1.28  						mode_t saved_mode = umask(066);
    1.29 -						/* the qmail style unique works only if delivering
    1.30 -						   with different process. We do not fork for each delivery,
    1.31 -						   so our uid is more unique. Hope it is compatible with all
    1.32 -						   MUAs.
    1.33 +						/* the qmail style unique works only if delivering with different process.
    1.34 +						   We do not fork for each delivery, so our uid is more unique.
    1.35 +						   Hope it is compatible with all MUAs.
    1.36  						 */
    1.37  						gchar *filename = g_strdup_printf("%s/tmp/%s.%s", path, msg->uid, conf.host_name);
    1.38  
    1.39 @@ -227,7 +225,8 @@
    1.40  							if (fflush(out) == EOF)
    1.41  								ok = FALSE;
    1.42  							else if (fdatasync(fileno(out)) != 0) {
    1.43 -								if (errno != EINVAL)  /* some fs do not support this..  I hope this also means that it is not necessary */
    1.44 +								if (errno != EINVAL)
    1.45 +									/* some fs do not support this..  I hope this also means that it is not necessary */
    1.46  									ok = FALSE;
    1.47  							}
    1.48  							fclose(out);