X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=mts%2Fsmtp%2Fsmtp.c;h=e7a64a0c0981f2bcc341f2aa09370245a6039c26;hb=128545e06224233b7e91fc4c83f8830252fe16c9;hp=e6bca9a9f1338f49d9a2ac6574cf285976a5fed9;hpb=da304a48a24d7cc7fafae13c994d94ad3d6483f2;p=mmh diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index e6bca9a..e7a64a0 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -1,8 +1,6 @@ /* * smtp.c -- nmh SMTP interface * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -443,12 +441,12 @@ sendmail_init (char *client, char *server, int watch, int verbose, if (client == NULL || *client == '\0') client = "localhost"; -#ifdef CYRUS_SASL +#if defined(CYRUS_SASL) || defined(TLS_SUPPORT) sasl_inbuffer = malloc(SASL_MAXRECVBUF); if (!sasl_inbuffer) return sm_ierror("Unable to allocate %d bytes for read buffer", SASL_MAXRECVBUF); -#endif /* CYRUS_SASL */ +#endif /* CYRUS_SASL || TLS_SUPPORT */ if (pipe (pdi) == NOTOK) return sm_ierror ("no pipes"); @@ -787,10 +785,12 @@ sm_end (int type) break; } +#ifdef TLS_SUPPORT if (tls_active) { SSL_shutdown(ssl); SSL_free(ssl); } +#endif /* TLS_SUPPORT */ if (sm_rfp != NULL) { alarm (SM_CLOS); @@ -1572,6 +1572,7 @@ sm_fgetc(FILE *f) * encryption working */ +#ifdef CYRUS_SASL if (sasl_complete == 0 || sasl_ssf == 0) { retbuf = tmpbuf; retbufsize = cc; @@ -1585,6 +1586,10 @@ sm_fgetc(FILE *f) return -2; } } +#else /* ! CYRUS_SASL */ + retbuf = tmpbuf; + retbufsize = cc; +#endif /* CYRUS_SASL */ } if (retbufsize > SASL_MAXRECVBUF) {