From: mortenp Date: Wed, 2 Jun 2004 21:57:30 +0000 (+1000) Subject: "Resolving" the conflict by committing my version anyway (it has a nice comment)... X-Git-Tag: RELEASE_1_0_0~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bca93f7adb9984ebfcb0e4d1f152a59151dff9a;p=thirdparty%2Fmlmmj.git "Resolving" the conflict by committing my version anyway (it has a nice comment). That guy is fast. --- diff --git a/src/mlmmj-send.c b/src/mlmmj-send.c index 70c4c5bc..8c25d47f 100644 --- a/src/mlmmj-send.c +++ b/src/mlmmj-send.c @@ -572,12 +572,18 @@ int main(int argc, char **argv) free(subfilename); initsmtp(&sockfd, relayhost); - if(send_mail_many(sockfd, NULL, NULL, mailfile, subfile, - listaddr, archivefilename, listdir, - mlmmjbounce)) + sendres = send_mail_many(sockfd, NULL, NULL, mailfile, + subfile, listaddr, archivefilename, + listdir, mlmmjbounce); + if (sendres) { + /* If send_mail_many() failed we close the + * connection to the mail server in a brutal + * manner, because we could be in any state + * (DATA for instance). */ close(sockfd); - else + } else { endsmtp(&sockfd); + } fclose(subfile); } closedir(subddir);