masqmail
diff src/pop3_in.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 | c93023f58cc7 |
line diff
1.1 --- a/src/pop3_in.c Wed Oct 29 21:21:26 2008 +0100 1.2 +++ b/src/pop3_in.c Thu Nov 06 09:18:38 2008 +0100 1.3 @@ -17,13 +17,13 @@ 1.4 1.5 /* see RFC 1725 */ 1.6 1.7 +#include <sys/wait.h> 1.8 +#include <sys/stat.h> 1.9 + 1.10 #include "masqmail.h" 1.11 #include "pop3_in.h" 1.12 #include "readsock.h" 1.13 1.14 -#include <sys/wait.h> 1.15 -#include <sys/stat.h> 1.16 - 1.17 #ifdef USE_LIB_CRYPTO 1.18 #include <openssl/md5.h> 1.19 #else 1.20 @@ -376,7 +376,7 @@ 1.21 while (*p && (*p != '>') && (i < 254)) 1.22 buf[i++] = *(p++); 1.23 buf[i++] = '>'; 1.24 - buf[i] = 0; 1.25 + buf[i] = '\0'; 1.26 1.27 popb->timestamp = g_strdup(buf); 1.28 1.29 @@ -448,14 +448,10 @@ 1.30 gint sock; 1.31 1.32 DEBUG(5) debugf("pop3_in_open_child entered, cmd = %s\n", cmd); 1.33 - 1.34 sock = child(cmd); 1.35 - 1.36 if (sock > 0) { 1.37 - 1.38 popb = create_pop3base(sock, flags); 1.39 popb->remote_host = NULL; 1.40 - 1.41 return popb; 1.42 } 1.43 logwrite(LOG_ALERT, "child failed (sock = %d): %s\n", sock, strerror(errno)); 1.44 @@ -566,7 +562,7 @@ 1.45 msg->rcpt_list = g_list_append(NULL, copy_address(rcpt)); 1.46 1.47 if ((err = accept_message(popb->in, msg, ACC_MAIL_FROM_HEAD 1.48 - | (conf.do_save_envelope_to ? ACC_SAVE_ENVELOPE_TO : 0))) 1.49 + | (conf.do_save_envelope_to ? ACC_SAVE_ENVELOPE_TO : 0))) 1.50 == AERR_OK) 1.51 return msg; 1.52 1.53 @@ -591,11 +587,8 @@ 1.54 pop3_in_quit(pop3_base * popb) 1.55 { 1.56 pop3_printf(popb->out, "QUIT\r\n"); 1.57 - 1.58 DEBUG(4) debugf("QUIT\n"); 1.59 - 1.60 signal(SIGALRM, SIG_DFL); 1.61 - 1.62 return TRUE; 1.63 } 1.64 1.65 @@ -620,7 +613,8 @@ 1.66 } 1.67 1.68 gboolean 1.69 -pop3_get(pop3_base * popb, gchar * user, gchar * pass, address * rcpt, address * return_path, gint max_count, gint max_size, gboolean max_size_delete) 1.70 +pop3_get(pop3_base * popb, gchar * user, gchar * pass, address * rcpt, address * return_path, 1.71 + gint max_count, gint max_size, gboolean max_size_delete) 1.72 { 1.73 gboolean ok = FALSE; 1.74 gint num_children = 0; 1.75 @@ -634,7 +628,8 @@ 1.76 if (pop3_in_stat(popb)) { 1.77 if (popb->msg_cnt > 0) { 1.78 1.79 - logwrite(LOG_NOTICE | LOG_VERBOSE, "%d message(s) for user %s at %s\n", popb->msg_cnt, user, popb->remote_host); 1.80 + logwrite(LOG_NOTICE | LOG_VERBOSE, "%d message(s) for user %s at %s\n", 1.81 + popb->msg_cnt, user, popb->remote_host); 1.82 1.83 if (pop3_in_list(popb)) { 1.84 gboolean do_get = !(popb->flags & POP3_FLAG_UIDL);